Re: [patch] gsoc, improving hash index v2

From: "Xiao Meng" <mx(dot)cogito(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Subject: Re: [patch] gsoc, improving hash index v2
Date: 2008-08-06 01:33:25
Message-ID: ded849dd0808051833v1c855ba7hccba739fe7778911@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, hackers. Here is some test I run on a bigger set.

Use a word list of 39916800 unique words
The table size is 1529MB.
Index BuildTime IndexSize
---- ---- ----
btree 874470.339ms 1027MB
hash-patch 513026.381 ms 1024MB

I use pgbench to test the time of a custom query script.
There are 2000 statements in the script.
It looks like this:
select * from dict where word='123456789a0'
...
The time of the two index is
btree: 1/0.174700=5.00250125
hash-patch: 1/0.199900=5.724098

---------------btree------------------
$ pgbench -n -f /tmp/query.sql dict
transaction type: Custom query
scaling factor: 1
query mode: simple
number of clients: 1
number of transactions per client: 10
number of transactions actually processed: 10/10
tps = 0.174694 (including connections establishing)
tps = 0.174700 (excluding connections establishing)

---------------hash patch-------------
$ pgbench -n -f /tmp/query.sql dict
transaction type: Custom query
scaling factor: 1
query mode: simple
number of clients: 1
number of transactions per client: 10
number of transactions actually processed: 10/10
tps = 0.199892 (including connections establishing)
tps = 0.199900 (excluding connections establishing)

--
Best Regards,
Xiao Meng

DKERC, Harbin Institute of Technology, China
Gtalk: mx(dot)cogito(at)gmail(dot)com
MSN: cnEnder(at)live(dot)com
http://xiaomeng.yo2.cn

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xiao Meng 2008-08-06 01:39:49 Re: [patch] gsoc, improving hash index v2
Previous Message Hiroshi Saito 2008-08-06 00:06:57 Re: unable to build libpq on Win 2003 (32 bit)