| From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Franck Routier <franck(dot)routier(at)axege(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: What happens between end of explain analyze and end of query execution ? |
| Date: | 2013-04-08 16:39:01 |
| Message-ID: | CAMkU=1zSCsB1oPRsK65Y4JV1+AWwDtLyR26NTHCRpfqSk_ORZw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On Sat, Apr 6, 2013 at 9:27 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Franck Routier <franck(dot)routier(at)axege(dot)com> writes:
> > 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.
>
> Yeah, eqjoinsel() is O(N^2) in the lengths of the MCV lists, in the
> worst case where there's little overlap in the list memberships.
> The actual cost would depend a lot on the specific column datatypes.
>
I guess this pre-emptively answers a question I was intending to ask on
performance: Whether anyone increased default_statistics_target and came
to regret it. I had seen several problems fixed by increasing
default_statistics_target, but this is the first one I recall caused by
increasing it.
Do you think fixing the O(N^2) behavior would be a good to-do item?
Cheers,
Jeff
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2013-04-08 16:46:26 | Re: What happens between end of explain analyze and end of query execution ? |
| Previous Message | hubert depesz lubaczewski | 2013-04-08 10:18:03 | Re: Find how much memory is postgres using |