Re: Limit & offset effect on query plans

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Limit & offset effect on query plans
Дата
Msg-id 20121213170700.80080@gmx.com
обсуждение исходный текст
Ответ на Limit & offset effect on query plans  (Amitabh Kant <amitabhkant@gmail.com>)
Ответы Re: Limit & offset effect on query plans  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Tom Lane wrote:
> "Kevin Grittner" <kgrittn@mail.com> writes:

>> I ran some quick tests on my i7 under Linux. Plan time was
>> increased by about 40 microseconds (based on EXPLAIN runtime)
>> and added a limit node to the plan. Execution time on a SELECT *
>> FROM tenk1 in the regression database went up by 1.35 ms on
>> fully cached runs.
>
> 1.35ms out of what?

Without the limit node the runtimes (after "priming" the cache)
were:

1.805, 2.533
1.805, 2.495
1.800, 2.446
1.818, 2.470
1.804, 2.502

The first time for each run is "Total runtime" reported by EXPLAIN,
the second is what psql reported from having \timing on.

With the limit node:

3.237, 3.914
3.243, 3.918
3.263, 4.010
3.265, 3.943
3.272, 3.953

I eyeballed that in the console window and said 1.35 based on rough
in-my-head calculations, although with it laid out in a nicer
format, I think I was a little low.

-Kevin


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

Предыдущее
От: Filip Rembiałkowski
Дата:
Сообщение: Re: problem with large inserts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Limit & offset effect on query plans