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
* will trillich in "Re: Re: SQL Where Like - Range it?!" dated
* 2001/04/28 03:17 wrote:
> apparently it does IF you use the 'anchor-at-beginning'
> construct, namely the "^":
>
> fld ~ '^[A-F]' -- STARTS with A,B,C,D,E, or F
> fld ~ '[A-F]' -- merely contains A,B,C,D,E, or F
>
H-
Thanks again.
Being slow at times I know why ~* '^[A-F]' wasn't working.
Yeah, that's right. There weren't any records in that range. I moved it
up and pulled some records in a range of A-P and it worked as expected.
Thanks to all that wrote in and replied. I understand why the LIKE 'A%'
> What I'd like to do is pull a list of records where there is a range
> of last names; say from A - F.
> select * from table where last_name LIKE 'A%' AND last_name LIKE 'F%'
> - for example.
>
> The above code I've tried for this doesn't seem to work as I'd expect
> it too?
When you use the AND
On Thu, 26 Apr 2001, Steagus wrote:
>
> What I'd like to do is pull a list of records where there is a range
> of last names; say from A - F.
> select * from table where last_name LIKE 'A%' AND last_name LIKE 'F%'
> - for example.
>
> The above code I've tried for this doesn't seem to work as