Re: Optimizer: limit not taken into account

From: "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimizer: limit not taken into account
Date: 2006-05-17 18:58:09
Message-ID: 446B7241.2060409@modgraph-usa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-17 19:00:01 Re: [PERFORM] Performance incorporate with JReport
Previous Message Tom Lane 2006-05-17 18:30:22 Re: Optimizer: limit not taken into account