On Sat, Sep 6, 2008 at 1:09 PM, Tom Lane <[EMAIL PROTECTED]> wrote: >For the convenience of anyone intending to test, here is an updated >patch against CVS HEAD that incorporates Alex's fix.
Here are the results for a table containing 1 million entries that will generate hash collisions. It paints a bad picture for the patch but then again im not sure how relevant the issue is. For example yesterday I imported a table with 10 million collisions and the create index is still running (now at about ~18 hours). Maybe we should warn if there are lots of collisions when creating the index and suggest you use a btree? Anyway here are the results. ./pgbench -c1 -n -t10 -f bench_createindex.sql cvs head: tps = 0.002169 v5 : tps = 0.002196 pgbench -c1 -n -t1000 -f bench_bitmap.sql cvs head: tps = 24.011871 v5: tps = 2.543123 pgbench -c1 -n -t1000 -f bench_index.sql cvs head: tps = 51.614502 v5: tps = 3.205542 pgbench -c1 -n -t1000 -f bench_seqscan.sql cvs head: tps = 8.553318 v5: tps = 9.836091 Table created via: create table test_hash (num int8); ./hash | psql -c 'copy test_hash from stdin;'
bench_create.sql
Description: Binary data
bench_index.sql
Description: Binary data
bench_seqscan.sql
Description: Binary data
int8collide.patch
Description: Binary data
#include <stdio.h> #include <stdlib.h> #include <limits.h> int main(void) { unsigned long y = 0; unsigned cnt = 0; while(cnt < 1000000) { y += UINT_MAX; y += 1; printf("%ld\n", y); cnt++; } }
-- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches