Re: Interpreting statistics collector output

Поиск
Список
Период
Сортировка
От Ron Mayer
Тема Re: Interpreting statistics collector output
Дата
Msg-id 46C70990.6040709@cheapcomplexdevices.com
обсуждение исходный текст
Ответ на Re: Interpreting statistics collector output  (Decibel! <decibel@decibel.org>)
Список pgsql-general
Decibel! wrote:
> On Aug 15, 2007, at 2:11 PM, Gregory Stark wrote:
>> "Decibel!" <decibel@decibel.org> writes:
>>> On Wed, Aug 15, 2007 at 01:26:02PM -0400, Steve Madsen wrote:
>>>> On Aug 15, 2007, at 11:52 AM, Decibel! wrote:
>>>>> I can't really think of a case where a seqscan wouldn't return all the
>>>>> rows in the table... that's what it's meant to do.
>>
>> LIMIT
>
> Ok, you got me. :P But normally you wouldn't do a LIMIT without some
> kind of an ORDER BY, which would mean scanning the whole table.


Seems "where exists" does it too, no?



test=#  explain analyze select 1 where exists (select * from bigtbl);
                                                    QUERY PLAN
------------------------------------------------------------------------------------------------------------------
 Result  (cost=9681.61..9681.62 rows=1 width=0) (actual time=0.033..0.034 rows=1 loops=1)
   One-Time Filter: $0
   InitPlan
     ->  Seq Scan on bigtbl  (cost=0.00..9681.61 rows=140461 width=443) (actual time=0.027..0.027 rows=1 loops=1)
 Total runtime: 0.177 ms
(5 rows)

В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Automating logins for mundane chores
Следующее
От: "Josh Tolley"
Дата:
Сообщение: Re: Partitioning