Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2130864FF6F for ; Mon, 8 Sep 2008 06:02:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76959-07 for ; Mon, 8 Sep 2008 06:02:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gmp-eb-inf-1.sun.com (gmp-eb-inf-1.sun.com [192.18.6.21]) by postgresql.org (Postfix) with ESMTP id 1D9E564FD16 for ; Mon, 8 Sep 2008 06:02:18 -0300 (ADT) Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m8892H6Y027403 for ; Mon, 8 Sep 2008 09:02:17 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K6V00901BA1M900@fe-emea-10.sun.com> (original mail from Zdenek.Kotala@Sun.COM) for pgsql-patches@postgresql.org; Mon, 08 Sep 2008 10:02:17 +0100 (BST) Received: from [192.168.1.101] ([89.102.161.149]) by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K6V00BP4D3BY280@fe-emea-10.sun.com>; Mon, 08 Sep 2008 10:02:00 +0100 (BST) Date: Mon, 08 Sep 2008 10:58:09 +0200 From: Zdenek Kotala Subject: Re: hash index improving v3 In-reply-to: <34d269d40809051321w2ed16037od0373a4a29c311f1@mail.gmail.com> To: Alex Hunsaker Cc: Xiao Meng , pgsql-patches@postgresql.org, "Jonah H. Harris" , Tom Lane Message-id: <48C4E921.20606@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <29987.1220560114@sss.pgh.pa.us> <7627.1220569888@sss.pgh.pa.us> <34d269d40809041742r6a0703dbgfbdd012f7f19de2e@mail.gmail.com> <10995.1220577198@sss.pgh.pa.us> <11525.1220579153@sss.pgh.pa.us> <34d269d40809041854g355a8f68ga3a037a69e3d9fcb@mail.gmail.com> <11962.1220581027@sss.pgh.pa.us> <34d269d40809042048m3b532a5ej7a9588f63a788d0c@mail.gmail.com> <34d269d40809050912u33f2afc8mb90e316bc465136e@mail.gmail.com> <34d269d40809051321w2ed16037od0373a4a29c311f1@mail.gmail.com> User-Agent: Thunderbird 2.0.0.16 (X11/20080811) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200809/90 X-Sequence-Number: 7105 It is nice test case. It should be part of hash index regression test. Zdenek Alex Hunsaker napsal(a): > Ok now that I made it so it actually *test* collisions, with the patch > it always returns all rows that matched the hashed "key". For example > (non lobotomized inthash8, I just brute forced some collisions for 0 > so that anyone can try this) > > create table test_hash (num int8); > insert into test_hash (num) values (0), (1805671691), (3294821164), > (4294967297); > create index test_hash_num_idx on test_hash using hash (num); > select * from test_hash where num = 0; > num > ------------ > 0 > 1805671691 > 3294821164 > 4294967297 > > set enable_bitmapscan to off; > > select * from test_hash where num = 0; > num > ----- > 0 > > CVS HEAD, 8_3_STABLE obviously work if I force the index scan -- Zdenek Kotala Sun Microsystems Prague, Czech Republic http://sun.com/postgresql