Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DE12B1337B88 for ; Tue, 30 Nov 2010 12:50:05 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 76069-03 for ; Tue, 30 Nov 2010 16:49:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 810941337B91 for ; Tue, 30 Nov 2010 12:49:56 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oAUGntmG028020; Tue, 30 Nov 2010 11:49:55 -0500 (EST) To: "Kevin Grittner" cc: "=?ISO-8859-15?Q?pasman=20pasma*ski?=" , pgsql-performance@postgresql.org Subject: Re: tidscan not work ? Pg 8.4.5 + WinXP In-reply-to: <4CF4D5760200002500037F7D@gw.wicourts.gov> References: <4CF4D5760200002500037F7D@gw.wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Tue, 30 Nov 2010 10:44:06 -0600" Date: Tue, 30 Nov 2010 11:49:55 -0500 Message-ID: <28019.1291135795@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/411 X-Sequence-Number: 41435 "Kevin Grittner" writes: > pasman pasma*ski wrote: >> This below not works :-( Always is used merge join. >> SELECT * FROM test1 join test2 on(test1.ctid=test2.ct) > You're reading through the entirety of two tables matching rows > between them. What makes you think random access would be faster > than sequential? FWIW, it isn't going to happen anyway, because the TID scan mechanism doesn't support scanning based on a join condition. That hasn't gotten to the top of the to-do list because the use case is almost vanishingly small. ctids generally aren't stable enough for it to be useful to store references to one table's ctids in another table. regards, tom lane