From: Rod Taylor <pg@rbt.ca>
To: Aaron Bono <postgresql@aranya.com>
Cc: PostgreSQL <pgsql-sql@postgresql.org>
Subject: Re: Efficient Searching of Large Text Fields
Date: Tue, 13 Jun 2006 16:43:41 -0400
Message-ID: <1150231421.777.167.camel@home> (raw)
In-Reply-To: <bf05e51c0606131330w75fd9b84ke63778a22ee0b2d9@mail.gmail.com>
References: <bf05e51c0606131330w75fd9b84ke63778a22ee0b2d9@mail.gmail.com>
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.
--
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pg@rbt.ca, postgresql@aranya.com
Subject: Re: Efficient Searching of Large Text Fields
In-Reply-To: <1150231421.777.167.camel@home>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox