Skip site navigation (1) Skip section navigation (2)

Re: A *short* planner question

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: A *short* planner question
Date: 2002-04-13 16:03:59
Message-ID: NEBBLAAHGLEEPCGOBHDGMEDFEMAA.nickf@ontko.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-general
> 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(at)ontko(dot)com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/





In response to

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2002-04-13 16:28:22
Subject: Re: A *short* planner question
Previous:From: OleDate: 2002-04-13 09:39:35
Subject: Please - postgresql cannot connect?

pgsql-general by date

Next:From: Tom LaneDate: 2002-04-13 16:28:22
Subject: Re: A *short* planner question
Previous:From: Tom LaneDate: 2002-04-13 15:34:34
Subject: Re: Suggestions please: names for function cachabilityattributes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group