Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 07D3E2E0051 for ; Tue, 17 Jun 2008 08:31:01 -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 81531-07 for ; Tue, 17 Jun 2008 08:30:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ppsw-1.csi.cam.ac.uk (ppsw-1.csi.cam.ac.uk [131.111.8.131]) by developer.postgresql.org (Postfix) with ESMTP id 041FD2E0050 for ; Tue, 17 Jun 2008 08:30:52 -0300 (ADT) X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from flymine.sysbiol.cam.ac.uk ([131.111.60.120]:50156 helo=flymine.flymine.org) by ppsw-1.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.131]:25) with esmtp id 1K8ZOi-00070b-3S (Exim 4.67) (return-path ); Tue, 17 Jun 2008 12:30:48 +0100 Received: from host103 ([192.168.128.103] helo=aragorn.flymine.org ident=Debian-exim) by flymine.flymine.org with esmtp (Exim 4.12) id 1K8ZOi-0004fM-00; Tue, 17 Jun 2008 12:30:48 +0100 Received: from mnw21 (helo=localhost) by aragorn.flymine.org with local-esmtp (Exim 4.69) (envelope-from ) id 1K8ZOi-0004vr-0V; Tue, 17 Jun 2008 12:30:48 +0100 Date: Tue, 17 Jun 2008 12:30:48 +0100 (BST) From: Matthew Wakeling X-X-Sender: mnw21@aragorn.flymine.org To: Howard Cole cc: pgsql-performance@postgresql.org Subject: Re: Tsearch2 Initial Search Speed In-Reply-To: <48579EB1.8050403@selestial.com> Message-ID: References: <4856A91F.1020001@selestial.com> <200806161124.57543@hal.medialogik.com> <485789C1.3000803@selestial.com> <485797D4.7010201@selestial.com> <48579EB1.8050403@selestial.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/64 X-Sequence-Number: 30414 On Tue, 17 Jun 2008, Howard Cole wrote: > They both appear to do a scan on the email table (Why?). The indexes don't contain copies of the row data. They only contain pointers to the rows in the table. So once the index has been consulted, Postgres still needs to look at the table to fetch the actual rows. Of course, it only needs to bother looking where the index points, and that is the benefit of an index. Matthew -- I've run DOOM more in the last few days than I have the last few months. I just love debugging ;-) -- Linus Torvalds