Re: Timing of 'SELECT 1'

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Timing of 'SELECT 1'
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB34101AD85@Herge.rcsinc.local
обсуждение исходный текст
Ответ на Timing of 'SELECT 1'  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Timing of 'SELECT 1'  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Timing of 'SELECT 1'  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
Bruce Momjian wrote:
> I am timing small queries, and found that a PREPARE/EXECUTE of "SELECT
> 1" takes about 1.2ms on my machine.  A normal SELECT doesn't take much
> longer, so I am wondering why a simpler query isn't faster.
>
> Looking at log_executor_stats, I see the following.  Execute shows
> nothing taking much time, mostly < .2ms, but the total seems high.  I
> wonder if one of our standard query start/stop functions is taking too
> long and can be optimized.

There seems to be a 'PostgreSQL ping' time of about 1-2 ms in best case
conditions which limits the amount of queries you can fire off in 1
second, no matter how simple.  In certain rare cases this is something
of a bottleneck.  In my personal case it would be nice to see that time
lower because converted COBOL applications tend to generate a lot of
'simple' queries.

Merlin


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: optimizing impossible matches
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PITR Functional Design v2 for 7.5