Re: Performance for seq. scans - Mailing list pgsql-general

From Steve Heaven
Subject Re: Performance for seq. scans
Date
Msg-id 3.0.1.32.20000726121413.0071dbc0@mail.thornet.co.uk
Whole thread Raw
In response to Performance for seq. scans  (Jules Bean <jules@jellybean.co.uk>)
Responses Re: Performance for seq. scans  (Jules Bean <jules@jellybean.co.uk>)
List pgsql-general
At 11:51 26/07/00 +0100, you wrote:
>Hi all,
>
>I've had a look over the docs and the FAQ and I can't see anything
>answering this, so here goes:
>
>I'm in the (slightly unusual, in a relational world) situation that
>the dominant query on my database is a wildcard search, so that no
>indexes can be used.  (E.g. select * from table_a where foo like
>'%bar%').

We were in a similar position and went for the 'Full Text Indexing" extra.
You'll find it in contrib/fulltextindex.
It creates a function which you call on a trigger to produce an index of
words for specified fields. These indexes do get _very_ large (one of ours
is ~800 MB), but it does work very well and speeds searches up enormously.

Steve

--
thorNET  - Internet Consultancy, Services & Training
Phone: 01454 854413
Fax:   01454 854412
http://www.thornet.co.uk

pgsql-general by date:

Previous
From: "Andrea Aime"
Date:
Subject: Re: Connecting to PostgreSQL databases
Next
From: Jules Bean
Date:
Subject: Re: Performance for seq. scans