Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 79D4C2E0048 for ; Tue, 17 Jun 2008 08:25:45 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 73823-06 for ; Tue, 17 Jun 2008 08:25:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ds528.dedicated.turbodns.co.uk (ds528.dedicated.turbodns.co.uk [81.21.72.118]) by developer.postgresql.org (Postfix) with ESMTP id 0ADED2E003F for ; Tue, 17 Jun 2008 08:25:35 -0300 (ADT) Received: (qmail 55850 invoked from network); 17 Jun 2008 11:25:31 -0000 Received: from howardnews@selestial.com by ds528.dedicated.turbodns.co.uk by uid 1005 with qmail-scanner-1.22 ( Clear:RC:1(62.3.231.11):. Processed in 0.023428 secs); 17 Jun 2008 11:25:31 -0000 Received: from unknown (HELO ?10.202.6.101?) (selestial-howard.cole@62.3.231.11) by ds528.dedicated.turbodns.co.uk with SMTP; 17 Jun 2008 11:25:30 -0000 Message-ID: <48579EB1.8050403@selestial.com> Date: Tue, 17 Jun 2008 12:23:29 +0100 From: Howard Cole User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Tsearch2 Initial Search Speed References: <4856A91F.1020001@selestial.com> <200806161124.57543@hal.medialogik.com> <485789C1.3000803@selestial.com> <485797D4.7010201@selestial.com> In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/63 X-Sequence-Number: 30413 > As far as I can see, that shouldn't make any difference. Both queries > still do the bitmap heap scan, and have almost exactly the same cost. > > Matthew > You may have a point there Matthew, they both appear to do a scan on the email table (Why?). But for whatever reason, I swear the second method is significantly faster! If I run the new style query first, then the original style (to_tsquery as q) then the original style still takes longer, even with the new style cached! Incidentally, how can I clear the cache in between queries?