Re: Nested Loop "Killer" on 8.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Dave North <DNorth(at)signiant(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Nested Loop "Killer" on 8.1
Date: 2009-06-25 21:05:30
Message-ID: 5388.1245963930@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Wed, Jun 24, 2009 at 1:43 PM, Dave North<DNorth(at)signiant(dot)com> wrote:
> Why use "like" for a constant string with no % or _ characters? If you
> used = the planner might be able to come up with a better estimate.

Uh, it appears to me the string *does* contain _ characters; perhaps the
OP has neglected to escape those?

The planner does know enough to estimate LIKE with a fixed pattern as
being equivalent to =. I think it knew that even back in 8.1, but am
too lazy to look right now.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Stark 2009-06-25 21:30:05 Re: Nested Loop "Killer" on 8.1
Previous Message Mark Mielke 2009-06-25 20:57:42 Re: Nested Loop "Killer" on 8.1