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

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

--- On Fri, 11/27/09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> You didn't show us any evidence of that, either.  Both
> of your test
> cases are using the index.

Ok...third try. The cost when passing in an empty string is SIGNIFICANTLY higher than when not. Wouldn't seem that the planner is using the index effectively.

Aggregate (cost=231884.57..231884.57 rows=1 width=0)

versus

Aggregate (cost=34.83..34.83 rows=1 width=0)

By

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2009-11-27 22:50:54 Re: empty string causes planner to avoid index. Makes me sad.
Previous Message Guillaume Lelarge 2009-11-27 22:29:57 Re: vacuumdb -z do a reindex?