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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Franck Routier <franck(dot)routier(at)axege(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: What happens between end of explain analyze and end of query execution ?
Date: 2013-04-06 16:27:21
Message-ID: 5541.1365265641@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

Not sure about your report that re-analyzing with the same stats target
made a significant difference. It might have been a matter of chance
variation in the sampled MCV list leading to more or fewer matches.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Nik Tek 2013-04-07 04:59:16 Find how much memory is postgres using
Previous Message Kevin Grittner 2013-04-06 15:26:31 Re: What happens between end of explain analyze and end of query execution ?