Re: What type of index do I need for this JOIN? - Mailing list pgsql-general

From Kevin Grittner
Subject Re: What type of index do I need for this JOIN?
Date
Msg-id 1376486081.24824.YahooMailNeo@web162903.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: What type of index do I need for this JOIN?  (Robert James <srobertjames@gmail.com>)
Responses Re: What type of index do I need for this JOIN?  (Robert James <srobertjames@gmail.com>)
List pgsql-general
Robert James <srobertjames@gmail.com> 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.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-general by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Materializing a view by hand
Next
From: Adrian Klaver
Date:
Subject: Re: Please help