[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-performance
Subject:    Re: [PERFORM] efficient pattern queries (using LIKE, ~)
From:       Mario Weilguni <mweilguni () sime ! com>
Date:       2007-09-11 19:08:37
Message-ID: 46E6E7B5.8000807 () sime ! com
[Download RAW message or body]

Fernan Aguero schrieb:
> Hi,
> 
> I have a table containing some ~13 million rows. Queries on
> indexed fields run fast, but unanchored pattern queries on a
> text column are slooooow. Indexing the column doesn't help
> (this is already mentioned in the manual).
> http://www.postgresql.org/docs/8.2/interactive/indexes-types.html
> 
> However, no alternative solution is mentioned for indexing
> and/or optimizing queries based on unanchored patterns: 
> i.e. description LIKE '%kinase%'.

Maybe trigram search might help you? Never tried it myself, but it seems 
to be able to handle substring searches.


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic