Re: empty string causes planner to avoid index. Makes me sad.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Amiel <becauseimjeff(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: empty string causes planner to avoid index. Makes me sad.
Date: 2009-11-27 23:10:31
Message-ID: 21905.1259363431@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Amiel <becauseimjeff(at)yahoo(dot)com> writes:
> Ok...third try. The cost when passing in an empty string is SIGNIFICANTLY higher than when not.

That just reflects the fact that it's expecting a lot more rows matching
that query. I suppose this is because the statistics show you've got a
lot more rows containing the empty string than other values.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-11-27 23:12:29 Re: Cannot allocate memory for output buffer
Previous Message Stephan Szabo 2009-11-27 23:07:43 Re: empty string causes planner to avoid index. Makes me sad.