Re: Re: SQL Where Like - Range it?! - Mailing list pgsql-general

From will trillich
Subject Re: Re: SQL Where Like - Range it?!
Date
Msg-id 20010501124416.A20453@serensoft.com
Whole thread Raw
In response to Re: Re: SQL Where Like - Range it?!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, Apr 30, 2001 at 01:11:21AM -0400, Tom Lane wrote:
> Always remember that the cost estimates quoted by EXPLAIN are estimates,
> not reality.
>
> In this case the reason for the difference is that the planner doesn't
> have any detailed understanding of the semantics of bracket-expressions
> in regexps, so it doesn't realize that ^[AB] could usefully use an
> index.  It wants to see ^ followed by at least one character of fixed
> pattern before it will think about an indexscan ...

so the query planner doesn't use indexes for ~'^[A-F]' then?
(meaning, such regex queries are all sequential scans...)

or are you saying that just the explainer routines don't?
(meaning, explain doesn't grok as well as the actual fetch-
and-match routines do...)

hmm?

--
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

pgsql-general by date:

Previous
From: Joel Burton
Date:
Subject: Re: best way to implement producer/consumer in Perl
Next
From: Joel Burton
Date:
Subject: Re: DROP TABLE wildcard