Performance for indexes on functions - Mailing list pgsql-general

From Patrick FICHE
Subject Performance for indexes on functions
Date
Msg-id NDBBLLLDELOMJPOBMKPPKELACDAA.pfiche@prologue-software.fr
Whole thread Raw
Responses Re: Performance for indexes on functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

I would like to use some indexes with functions like substr :
CREATE INDEX IND1 ON T1 ( substr( col1, 1, 5 ) )...
What are the performance of such an index compared to an index on col1...
In which cases will this index be used in a query : Does the where clause
has to match exactly the function used when creating the index : SELECT ...
WHERE substr( col1, 1, 5 ) = '.....'.
Do you recommend or not to use this kind of indexes ?

Excuse me it it's not really clear but if necessary, I will try to explain
it better...

Thanks a lot

Patrick FICHE


pgsql-general by date:

Previous
From: Ron Peterson
Date:
Subject: Re: Help:How do you find that how much storage is taken by the database??
Next
From: Ron Peterson
Date:
Subject: Re: trigger errors