Re: What happens between end of explain analyze and end of query execution ?

Поиск
Список
Период
Сортировка
От Franck Routier
Тема Re: What happens between end of explain analyze and end of query execution ?
Дата
Msg-id 515FE547.3010301@axege.com
обсуждение исходный текст
Ответ на Re: What happens between end of explain analyze and end of query execution ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: What happens between end of explain analyze and end of query execution ?  (Kevin Grittner <kgrittn@ymail.com>)
Re: What happens between end of explain analyze and end of query execution ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Le 05/04/2013 16:17, Tom Lane a écrit :
> What have you got the statistics targets set to in this database?

Ok, the problem definitely comes from the default_statistics_target
which is obviously too high on the database.

I have experimented with explain on queries with another set of 4 joined
tables.
In my first attempt, explain took more than 4 seconds (!)
Then I have set default_statistics_target to 100 and analyzed the 4
tables. Explain took a few ms.
Restored default_statistics_target to 5000, analyzed again. Explain took
1.8 seconds.

So, I seem to have two related problems: statistics are somewhat bloated
(as re-analyzing with same target takes the explain time from 4 sec down
to 1.8 sec).
And the target is far too high (as default target value take analyse
down to a few ms).

Now... can someone help me understand what happens ? Where can I look
(in pg_stats ?) to see the source of the problem ? maybe a column with a
huge list of different values the palnner has to parse ?


Regards,
Franck


Вложения

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

Предыдущее
От: Franck Routier
Дата:
Сообщение: Re: What happens between end of explain analyze and end of query execution ?
Следующее
От: Julien Cigar
Дата:
Сообщение: Re: slow joins?