pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Franck Routier <franck.routier@axege.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: What happens between end of explain analyze and end of query execution ?
Date: Mon, 08 Apr 2013 12:46:26 -0400
Message-ID: <16275.1365439586@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMkU=1zSCsB1oPRsK65Y4JV1+AWwDtLyR26NTHCRpfqSk_ORZw@mail.gmail.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>
	<5541.1365265641@sss.pgh.pa.us>
	<CAMkU=1zSCsB1oPRsK65Y4JV1+AWwDtLyR26NTHCRpfqSk_ORZw@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Jeff Janes <jeff.janes@gmail.com> writes:
> On Sat, Apr 6, 2013 at 9:27 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.

> 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.

I recall having heard some similar complaints before, but not often.

> Do you think fixing the O(N^2) behavior would be a good to-do item?

If you can think of a way to do it that doesn't create new assumptions
that eqjoinsel ought not make (say, that the datatype is sortable).

I guess one possibility is to have a different join selectivity function
for those types that *are* sortable, which would fix the issue for most
commonly used types.

			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)

Message-ID: <16275.1365439586@sss.pgh.pa.us>
Permalink:  ../16275.1365439586@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16275.1365439586@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, jeff.janes@gmail.com, franck.routier@axege.com
  Subject: Re: What happens between end of explain analyze and end of query execution ?
  In-Reply-To: <16275.1365439586@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