Performance for indexes on functions

From: "Patrick FICHE" <pfiche(at)prologue-software(dot)fr>
To: "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Performance for indexes on functions
Date: 2000-06-15 14:02:19
Message-ID: NDBBLLLDELOMJPOBMKPPKELACDAA.pfiche@prologue-software.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Peterson 2000-06-15 15:32:52 Re: trigger errors
Previous Message Thomas Lockhart 2000-06-15 13:43:45 Re: Access Permission Denied