Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)
Дата
Msg-id 4919A1C9.70202@archonet.com
обсуждение исходный текст
Ответ на Very slow queries w/ NOT IN preparation (seems like a bug, test case)  ("Sergey Konoplev" <gray.ru@gmail.com>)
Ответы Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)  ("Sergey Konoplev" <gray.ru@gmail.com>)
Список pgsql-general
Sergey Konoplev wrote:
>> Maybe something to do with process startup is delaying things - could
>> you tweak the test script to send the outputs of the explain somewhere
>> other than /dev/null? That way we'd know if there was a big difference
>> between query-execution-time and process-execution-time.
>>
>
> I did \timing and run my query in console. You can find the result in
> attachement. Will it be enough?

Very strange.

The explain runtime is 3.1 seconds, but \timing shows 37.8 seconds
before it returns.

And it only does this for the NOT IN version of the query, but the IN
version seems OK.

The two together make no sense to me.

If you do the same again but "\o /dev/null" before the /timing, is it
still slow?
If not, what about "\o /tmp/results.txt"?

That should rule out something strange with displaying a very long line
(and I admit I'm reduced to wild guesses now).

If you run it over the network, can you try running it directly on the
server?

Finally - did you compile this from source yourself, or is it installed
via apt? I'm wondering whether you have an unusual version of a library
linked in, and it's taking a long time to parse the query.

Actually, we can test that. If you run the same query against an empty
table, does it take more than a few milliseconds?

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Web Application Engineer - Drupal, PHP, CSS, JavaScript, Postgresql
Следующее
От: Vaclav TVRDIK
Дата:
Сообщение: Timestamp precission question