From: | Franck Routier <franck(dot)routier(at)axege(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: What happens between end of explain analyze and end of query execution ? |
Date: | 2013-04-06 09:05:11 |
Message-ID: | 515FE547.3010301@axege.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Cigar | 2013-04-06 10:53:37 | Re: slow joins? |
Previous Message | Franck Routier | 2013-04-06 08:13:37 | Re: What happens between end of explain analyze and end of query execution ? |