From: Andrew Sullivan <ajs@crankycanuck.ca>
To: Sumeet <asumeet@gmail.com>
Cc: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Multiple DB join
Date: Fri, 18 Aug 2006 11:20:19 -0400
Message-ID: <20060818152019.GB31921@phlogiston.dyndns.org> (raw)
In-Reply-To: <7539aebb0608180807j4ca4da62l4e464f4ea4eaa984@mail.gmail.com>
References: <44E0EA72.2090505@indiana.edu>
<20060815103624.GA21634@phlogiston.dyndns.org>
<44E1D61D.4020400@indiana.edu>
<20060815141712.GB21939@phlogiston.dyndns.org>
<7539aebb0608150735l34e59630m25487549c8e6de2d@mail.gmail.com>
<20060815144539.GE21939@phlogiston.dyndns.org>
<7539aebb0608180807j4ca4da62l4e464f4ea4eaa984@mail.gmail.com>
On Fri, Aug 18, 2006 at 11:07:24AM -0400, Sumeet wrote:
>
> Will the full text search indexing help me achive a good speed in searching
> keywords???
I think this depends on how you use it.
> can someone plz ellaborate a little about ways we can enforce bounded
> searches?. I'm basically trying a simple search
> i.e. trying to find name of authors user enters into a interface against the
> 20 miliions records in my db. Can anyone suggest a good way to perform this
> kind of search ?.
The thing is, if they're keywords, why are you treating them as
fragments? Traditionally, keywords are not substrings, but full
barewords. A bareword match should be fast, because it's looking for
the whole string. So you shouldn't need the "%" characters.
Maybe the problem that you have something like the following. If
your data is stored like this
subject | keyword
subject1 | keyword1 keyword2 keyword3
and you want every subject that matches on keyword2, then you have to
search this with SELECT subject WHERE keyword = '%keyword2%'. The
reason you have to do that is that your data is badly normalised. Is
that it?
A
--
Andrew Sullivan | ajs@crankycanuck.ca
Information security isn't a technological problem. It's an economics
problem.
--Bruce Schneier
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: ajs@crankycanuck.ca, asumeet@gmail.com
Subject: Re: Multiple DB join
In-Reply-To: <20060818152019.GB31921@phlogiston.dyndns.org>
* 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