X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A9967D1B43C for ; Thu, 27 Nov 2003 05:17:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 25728-07 for ; Thu, 27 Nov 2003 01:17:09 -0400 (AST) Received: from gp.word-to-the-wise.com (gp.word-to-the-wise.com [64.71.176.18]) by svr1.postgresql.org (Postfix) with ESMTP id 7FA97D1B441 for ; Thu, 27 Nov 2003 01:17:08 -0400 (AST) Received: by gp.word-to-the-wise.com (Postfix, from userid 500) id 195A190000D; Wed, 26 Nov 2003 21:12:30 -0800 (PST) Date: Wed, 26 Nov 2003 21:12:30 -0800 From: Steve Atkins To: pgsql-performance@postgresql.org Subject: Re: For full text indexing, which is better, tsearch2 or Message-ID: <20031127051230.GA6212@gp.word-to-the-wise.com> References: <4c0ccf4c27ff.4c27ff4c0ccf@jhmimail.jhmi.edu> <3FC54A82.2040605@familyhealth.com.au> <20031127032831.GA4836@gp.word-to-the-wise.com> <3FC58097.8090803@familyhealth.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FC58097.8090803@familyhealth.com.au> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/289 X-Sequence-Number: 4849 On Thu, Nov 27, 2003 at 12:41:59PM +0800, Christopher Kings-Lynne wrote: > >Does anyone have any metrics on how fast tsearch2 actually is? > > > >I tried it on a synthetic dataset of a million documents of a hundred > >words each and while insertions were impressively fast I gave up on > >the search after 10 minutes. > > > >Broken? Unusable slow? This was on the last 7.4 release candidate. > > I just created a 1.1million row dataset by copying one of our 30000 row > production tables and just taking out the txtidx column. Then I > inserted it into itself until it had 1.1 million rows. > > Then I created the GiST index - THAT took forever - seriously like 20 > mins or half an hour or something. > > Now, to find a word: > > select * from tsearchtest where ftiidx ## 'curry'; > Time: 9760.75 ms > So, I have no idea why you think it's slow? Perhaps you forgot the > 'create index using gist' step? No, it was indexed. Thanks, that was the datapoint I was looking for. It _can_ run fast, so I just need to work out what's going on. (It's hard to diagnose a slow query when you've no idea whether it's really 'slow'). Cheers, Steve