Lexicographic index ?

From: arnaud(dot)mlist1(at)free(dot)fr
To: pgsql-general(at)postgresql(dot)org
Subject: Lexicographic index ?
Date: 2002-05-16 09:27:57
Message-ID: 1021541277.3ce37b9db49fd@imp.free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello, I've been searching since last week how I could implement what looks
basically like a dictionnary with postgres :

I have a big table (million of rows) which contains a varchar column with words
like this for example :

Table Twords:

words
-----------------
guitar
saxophon
flute

And what I want to built a query that tells me if a word given in argument can
be found at least partially in the database. Something like

select * from twords where words||'%' like 'saxophones';

works but uses a sequential scan on the table...

Is it possible to do what I want with postgres or not ? How ? :-)
Thanks for your help !

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marin Dimitrov 2002-05-16 09:42:38 Re: Lexicographic index ?
Previous Message Tino Wildenhain 2002-05-16 09:04:18 Re: restoring databases with intensive foreign key use