Re: [SQL] Very slow search using basic pattern matching

2004-05-19 Thread Raphael A. Bauer
Dan Field wrote: Is there any documentation available on how to go about creating these indexes on my text fields? I'm at a bit of a loss here, Google is failing me sadly http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ We made quite good experiences with tsearch2. The problem for you coul

Re: [SQL] Very slow search using basic pattern matching

2004-05-19 Thread Dan Field
On 18 May 2004, at 17:12, Bruno Wolff III wrote: On Tue, May 18, 2004 at 16:47:11 +0100, Dan Field <[EMAIL PROTECTED]> wrote: FROM da_records WHERE da_records.DESCRIPTION_CY ~* '.*Aberystwyth*.' OR da_records.TITLE_CY ~* '.*Aberystwyth*.' limit 100 Is there a better way o

Re: [SQL] Very slow search using basic pattern matching

2004-05-18 Thread Karsten Hilbert
> WHERE > da_records.DESCRIPTION_CY ~* '.*Aberystwyth*.' > OR > da_records.TITLE_CY ~* '.*Aberystwyth*.' > limit 100 > > Is there a better way of matching the string? (Must be case > insensitive) Are you sure you can't anchor the search pattern ? eg ~* '^' || lower('Aberys

Re: [SQL] Very slow search using basic pattern matching

2004-05-18 Thread Bruno Wolff III
On Tue, May 18, 2004 at 16:47:11 +0100, Dan Field <[EMAIL PROTECTED]> wrote: > FROM > da_records > WHERE > da_records.DESCRIPTION_CY ~* '.*Aberystwyth*.' > OR > da_records.TITLE_CY ~* '.*Aberystwyth*.' > limit 100 > > Is there a better way of matching the string? (Must be case