pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig A. James <cjames@modgraph-usa.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimizer: limit not taken into account
Date: Wed, 17 May 2006 11:58:09 -0700
Message-ID: <446B7241.2060409@modgraph-usa.com> (raw)
In-Reply-To: <24245.1147890622@sss.pgh.pa.us>
References: <44699C6C.80302@tweakers.net>
	<4469D173.50406@sun.com>
	<4469D986.6090300@tweakers.net>
	<4469F55A.7040004@sun.com>
	<446A1520.2020601@tweakers.net>
	<446B0409.7050902@sun.com>
	<446B0ED2.5030909@tweakers.net>
	<446B474C.2050803@modgraph-usa.com>
	<20060517174426.GA14567@wolff.to>
	<24245.1147890622@sss.pgh.pa.us>

Tom Lane wrote:
> There is not anything in there that considers whether the table's
> physical order is so nonrandom that the search will take much longer
> than it would given uniform distribution.  It might be possible to do
> something with the correlation statistic in simple cases ...

In this case, the rows are not random at all, in fact they're inserted from a sequence, then rows are deleted as they are processed.  If the planner is hoping for random physical distribution, this particular case is exactly wrong. 

Craig



view thread (6+ messages)  latest in thread

Message-ID: <446B7241.2060409@modgraph-usa.com>
Permalink:  ../446B7241.2060409@modgraph-usa.com/
Also on:    postgresql.org/message-id/446B7241.2060409@modgraph-usa.com

 · 

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: cjames@modgraph-usa.com, tgl@sss.pgh.pa.us, bruno@wolff.to
  Subject: Re: Optimizer: limit not taken into account
  In-Reply-To: <446B7241.2060409@modgraph-usa.com>

* 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