X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A2F5D9FA4F0 for ; Fri, 18 Aug 2006 12:20:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 84352-05-4 for ; Fri, 18 Aug 2006 15:20:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id CF0619FA621 for ; Fri, 18 Aug 2006 12:20:26 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1GE6Lb-00072W-I3; Fri, 18 Aug 2006 11:33:23 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id A15144051; Fri, 18 Aug 2006 11:20:19 -0400 (EDT) Date: Fri, 18 Aug 2006 11:20:19 -0400 From: Andrew Sullivan To: Sumeet Cc: Andrew Sullivan , pgsql-sql@postgresql.org Subject: Re: Multiple DB join Message-ID: <20060818152019.GB31921@phlogiston.dyndns.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7539aebb0608180807j4ca4da62l4e464f4ea4eaa984@mail.gmail.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.735 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, FUZZY_MILLION X-Spam-Level: *** X-Archive-Number: 200608/143 X-Sequence-Number: 26101 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