Received: from icebox.venux.net (icebox.venux.net [216.120.166.10]) by hub.org (8.10.1/8.10.1) with ESMTP id e5NEli178412; Fri, 23 Jun 2000 10:47:44 -0400 (EDT) Received: from doot (usr1-ip090-grr.wmis.net [209.176.193.140]) by icebox.venux.net (Postfix) with SMTP id 240FE26208; Fri, 23 Jun 2000 10:53:57 -0400 (EDT) Message-ID: <006d01bfdd22$d3129460$0300000a@doot.org> From: "Mitch Vincent" To: "Vassili A Akimov" , , References: <395373C5.B1C2A566@erols.com> Subject: Re: Need to improve performance Date: Fri, 23 Jun 2000 10:53:41 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200006/208 > vacuum; > vacuum analyze; > select f1.id from app_fti f1, app_fti f2 where f1.string~*'visual' and > f2.string~*'basic' and f1.id=f2.id; Use ~*'^basic' It will use the indexes I believe. Also, enable likeplanning (look in contrib/likeplanning) -- it will speed things up too.. If that doesn't help then use EXPLAIN to get your query plan and post it, I'll try to help further... I'm doing this exact thing, so have some experience on tweaking it (Thanks again Tom!) :-) I'd bet what's happening is you're doing a seq scan, not something you want to do on that big of a table. (I know that's what's happening with using ~*'whatever' ) Make good use of the stop words in fti.c too (be sure to order them, it's a binary search). Hope that helps.. -Mitch