pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Cousin <cousinmarc@gmail.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: pgsql-performance@postgresql.org
Subject: Re: inheritance: planning time vs children number vs column number
Date: Tue, 01 Mar 2011 12:33:54 -0500
Message-ID: <22075.1299000834@sss.pgh.pa.us> (raw)
In-Reply-To: <17604.1298993631@sss.pgh.pa.us>
References: <201102281038.04945.cousinmarc@gmail.com>
	<201102281947.46590.cousinmarc@gmail.com>
	<4188.1298960419@sss.pgh.pa.us>
	<201103010842.42128.cousinmarc@gmail.com>
	<17604.1298993631@sss.pgh.pa.us>

I wrote:
> Marc Cousin <cousinmarc@gmail.com> writes:
>> Yes, for the same test case, with a bit of data in every partition and 
>> statistics up to date, planning time goes from 20 seconds to 125ms for the 600 
>> children/1000 columns case. Which is of course more than acceptable.

> [ scratches head ... ]  Actually, I was expecting the runtime to go up
> not down.  Maybe there's something else strange going on here.

Oh, doh: the failing pg_statistic lookups are all coming from the part
of estimate_rel_size() where it tries to induce a reasonable tuple width
estimate for an empty table (see get_rel_data_width).  Probably not a
case we need to get really tense about.  Of course, you could also argue
that this code is stupid because it's very unlikely that there will be
any pg_statistic entries either.  Maybe we should just have it go
directly to the datatype-based estimate instead of making a boatload
of useless pg_statistic probes.

			regards, tom lane



view thread (10+ messages)

Message-ID: <22075.1299000834@sss.pgh.pa.us>
Permalink:  ../22075.1299000834@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22075.1299000834@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, cousinmarc@gmail.com, heikki.linnakangas@enterprisedb.com
  Subject: Re: inheritance: planning time vs children number vs column number
  In-Reply-To: <22075.1299000834@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