pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Yen <dba@richyen.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: query plan with index having a btrim is different for strings of different length
Date: Wed, 10 Dec 2008 14:34:33 -0500
Message-ID: <6020.1228937673@sss.pgh.pa.us> (raw)
In-Reply-To: <E8AE9590-4E30-49C0-B11F-D7131009A095@richyen.com>
References: <751F49DC-1142-4E9C-95C8-BC3C229B3F0B@richyen.com>
	<22937.1228865243@sss.pgh.pa.us>
	<E8AE9590-4E30-49C0-B11F-D7131009A095@richyen.com>

Richard Yen <dba@richyen.com> writes:
> You guys are right.  I tried "Miller" and gave me the same result.  Is  
> there any way to tune this so that for the common last names, the  
> query run time doesn't jump from <1s to >300s?

If the planner's estimation is that far off then there must be something
very weird about the table statistics, but you haven't given us any clue
what.

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <6020.1228937673@sss.pgh.pa.us>
Permalink:  ../6020.1228937673@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6020.1228937673@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, dba@richyen.com
  Subject: Re: query plan with index having a btrim is different for strings of different length
  In-Reply-To: <6020.1228937673@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