pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Fankhauser <nickf@ontko.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: A *short* planner question
Date: Sat, 13 Apr 2002 11:03:59 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGMEDFEMAA.nickf@ontko.com> (raw)
In-Reply-To: <11984.1018657676@sss.pgh.pa.us>


> Hmm.  If the outer side of the nestloop were actually hitting 2696 rows
> on average, it wouldn't be "lightning fast".  So the planner's failure
> to choose this plan is probably due to this overestimate.

This may be a reasonable estimate- as you might have gathered, we're
matching people to court cases. The typical person (hopefully) only has one
case that they're involved with, but an attorney may be in the 1K-10K range
and a judge in 10k-100K. Since they all live in the same table, the estimate
may not be all that far off. In addition, since we're using a "like", typing
in only an initial char would get roughly 1/26 of the rows back- Does the
planner look at the number of leading chars provided when coming up with a
plan?

> still on 7.1.*, right?  It'd be interesting to know if 7.2 gets
> this right; it has more detailed stats and hopefully would make a better
> estimate of the number of matches.

7.2 on our development box is on the middle-priority TODO list. (2-4 weeks.)
I'll provide feedback when we get there.

As always, thanks for the help!

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/







view thread (6+ messages)  latest in thread

Message-ID: <NEBBLAAHGLEEPCGOBHDGMEDFEMAA.nickf@ontko.com>
Permalink:  ../NEBBLAAHGLEEPCGOBHDGMEDFEMAA.nickf@ontko.com/
Also on:    postgresql.org/message-id/NEBBLAAHGLEEPCGOBHDGMEDFEMAA.nickf@ontko.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: nickf@ontko.com, tgl@sss.pgh.pa.us
  Subject: Re: A *short* planner question
  In-Reply-To: <NEBBLAAHGLEEPCGOBHDGMEDFEMAA.nickf@ontko.com>
  References: <11984.1018657676@sss.pgh.pa.us> <NEBBLAAHGLEEPCGOBHDGMEDFEMAA.nickf@ontko.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