Worthwhile optimisation of position()? - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Worthwhile optimisation of position()?
Date
Msg-id 44235FB9.5040202@calorieking.com
Whole thread Raw
Responses Re: Worthwhile optimisation of position()?  (Thomas Hallgren <thomas@tada.se>)
List pgsql-hackers
Is it worth allowing this:

select count(*) from users_users where position('ch' in username) = 0;

To be able to use an index, like:

select count(*) from users_users where username like 'ch%';

At the moment the position() syntax will do a seqscan, but the like 
syntax will use an index.

Chris



pgsql-hackers by date:

Previous
From: "Joel Miller"
Date:
Subject: Re: [SUGGESTION] CVSync
Next
From: Thomas Hallgren
Date:
Subject: Re: Worthwhile optimisation of position()?