Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: Creating la...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 3981 of 4424
Post > Topic >>

Re: Creating large database of MD5 hash values

by fweimer@[EMAIL PROTECTED] (Florian Weimer) Apr 11, 2008 at 04:05 PM

* Jon Stewart:

> 1. Which datatype should I use to represent the hash value? UUIDs are
> also 16 bytes...

BYTEA is slower to load and a bit inconvenient to use from DBI, but
occupies less space on disk than TEXT or VARCHAR in hex form (17 vs 33
bytes with PostgreSQL 8.3).

> 2. Does it make sense to denormalize the hash set relation****ps?

That depends entirely on your application.

> 3. Should I index?

Depends.  B-tree is generally faster than Hash, even for randomly
distributed keys (like the output of a hash function).

> 4. What other data structure options would it make sense for me to
> choose?

See 2.

In general, ha****ng is bad because it destroy locality.  But in some
cases, there is no other choice.

--=20
Florian Weimer                <fweimer@[EMAIL PROTECTED]
>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstra=DFe 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

--=20
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 6 Posts in Topic:
Creating large database of MD5 hash values
jonathan.l.stewart@[EMAIL  2008-04-10 10:48:59 
Re: Creating large database of MD5 hash values
dmagick@[EMAIL PROTECTED]  2008-04-11 15:11:34 
Re: Creating large database of MD5 hash values
fweimer@[EMAIL PROTECTED]  2008-04-11 16:05:00 
Re: Creating large database of MD5 hash values
alvherre@[EMAIL PROTECTED  2008-04-11 10:25:44 
Re: Creating large database of MD5 hash values
jonathan.l.stewart@[EMAIL  2008-04-11 11:28:55 
Re: Creating large database of MD5 hash values
fweimer@[EMAIL PROTECTED]  2008-04-11 19:04:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 8:14:32 CST 2008.