pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Franck Routier <franck.routier@axege.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What happens between end of explain analyze and end of query execution ?
Date: Sat, 06 Apr 2013 12:27:21 -0400
Message-ID: <5541.1365265641@sss.pgh.pa.us> (raw)
In-Reply-To: <515FE547.3010301@axege.com>
References: <515D92BF.5000309@axege.com>
	<CAPmjWd100eemBz1RTw=r24zgh8+YO8iq86fThqsALznrPuyWqg@mail.gmail.com>
	<515D9FC5.7030105@axege.com>
	<18910.1365092713@sss.pgh.pa.us>
	<515DCB34.6040801@axege.com>
	<6354.1365102532@sss.pgh.pa.us>
	<515ED7BC.40907@axege.com>
	<4113.1365171448@sss.pgh.pa.us>
	<515FE547.3010301@axege.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Franck Routier <franck.routier@axege.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


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (21+ messages)  latest in thread

Message-ID: <5541.1365265641@sss.pgh.pa.us>
Permalink:  ../5541.1365265641@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5541.1365265641@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, franck.routier@axege.com
  Subject: Re: What happens between end of explain analyze and end of query execution ?
  In-Reply-To: <5541.1365265641@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox