Alex, > I read your article about indexing in postgres which unfortunately ends > after the 2nd part. So I decided to ask you by email.
Yeah, yeah, I know. The completed version will probably become part of a published book. We'll see. > Is it somehow possible to create an index for the ILIKE comparision? > I set up a database which contains the paths to all files in my network > neighborghood. Short of creating your own datatype, you can't index for ILIKE. Instead, you create an index on the LOWER() of the column ... CREATE INDEX idx_table_lower_text ON table(lower(text_field)); Then, you make sure when querying to query the lower function: SELECT * FROM table WHERE lower(text_field) LIKE 'xxxyy%'; This will use the index wherever it improves execution. I suggest that you join the PGSQL-SQL mailing list for future questions of this type. -- Josh Berkus Aglio Database Solutions San Francisco ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly