Re: Efficient Searching of Large Text Fields

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Aaron Bono <postgresql(at)aranya(dot)com>
Cc: PostgreSQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Efficient Searching of Large Text Fields
Date: 2006-06-13 20:43:41
Message-ID: 1150231421.777.167.camel@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 2006-06-13 at 15:30 -0500, Aaron Bono wrote:
> In another post on a different topic, Rod Taylor said the following:
>
> "A\tcat in the\nhat" might be stored as ARRAY['A', 'cat', 'in', 'the', 'hat'].
>
> This got me thinking. I have a discussion forum for gamers and want
> to provide searching capabilities so the user can type in a phrase
> like "magical bow" and get all posts, sorted by relevance that contain
> these words.
>
> My questions are:
> 1. Will storing the posts in an ARRAY help improve performance of
> these searches? If so, by how much?

It won't help at all. Fast partial matches against arrays is nearly
impossible. You might take a look at tsearch though.

--

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message PFC 2006-06-13 20:52:39 Re: Efficient Searching of Large Text Fields
Previous Message Aaron Bono 2006-06-13 20:30:44 Efficient Searching of Large Text Fields