Re: hash index improving v3

Zdenek Kotala <[email protected]> Mon, 08 Sep 2008 10:58:09 +0200
Newsgroups gmane.comp.db.postgresql.devel.patches
Message-ID <[email protected]>
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


-- 
Sent via pgsql-patches mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches