Search Postgresql Archives

Re: What type of index do I need for this JOIN?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/14/13, Kevin Grittner <kgrittn@xxxxxxxxx> wrote:
> Robert James <srobertjames@xxxxxxxxx> wrote:
>
>> I'm confused: What's the difference between
>>   col LIKE  'foo%'
>> and
>>   col LIKE f1 || '%'
>> ?
>
> The planner knows that 'foo%' doesn't start with a wildcard.
>
>> Either way, it's anchored to the beginning of the string.
>
> Not necessarily.

I see, yes, f1 might include a wildcard.

Is there a way to escape f1 so that wildcards aren't interpreted?
That's anyway the behavior I need, of course.  And will that help the
planner?

What type of index will help the planner here?


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux