Re: [pgsql-hackers-win32] Help with tuning this query (with explain analyze finally)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pgsql-hackers-win32] Help with tuning this query (with explain analyze finally)
Дата
Msg-id 2555.1110213531@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] Help with tuning this query (with  (John A Meinel <john@arbash-meinel.com>)
Ответы Re: [pgsql-hackers-win32] Help with tuning this query (with  (John A Meinel <john@arbash-meinel.com>)
Список pgsql-performance
John A Meinel <john@arbash-meinel.com> writes:
>>> Can we just replace gettimeofday() with a version that's basically:
>>
>> No, because it's also used for actual time-of-day calls.  It'd be
>> necessary to hack executor/instrument.c in particular.

> Or we modify the win32 gettimeofday call to something like:

That's what Magnus was talking about, but it's really no good because
it would cause Postgres' now() function to fail to track post-boot-time
changes in the system date setting.  Which I think would rightly be
considered a bug.

The EXPLAIN ANALYZE instrumentation code will really be happier with a
straight time-since-bootup counter; by using gettimeofday, it is
vulnerable to giving wrong answers if someone changes the date setting
while the EXPLAIN is running.  But there is (AFAIK) no such call among
the portable Unix syscalls.  It seems reasonable to me to #ifdef that
code to make use of QueryPerformanceCounter on Windows.  This does not
mean we want to alter the behavior of gettimeofday() where it's being
used to find out the time of day.

            regards, tom lane

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

Предыдущее
От: John A Meinel
Дата:
Сообщение: Re: [pgsql-hackers-win32] Help with tuning this query (with
Следующее
От: Hugo Ferreira
Дата:
Сообщение: Help trying to tune query that executes 40x slower than in SqlServer