Which is faster: md5() or hashtext()? - Mailing list pgsql-general

From Henry C.
Subject Which is faster: md5() or hashtext()?
Date
Msg-id 59df37f0b52657a0f5114684fe96a9cb.squirrel@zenmail.co.za
Whole thread Raw
Responses Re: Which is faster: md5() or hashtext()?
List pgsql-general
G'day,

I need to do a mass update on about 550 million rows (I will be breaking it up
into chunks based on id value so I can monitor progress).

Hashing one of the columns is part of the process and I was wondering which is
more efficient/faster:  md5() or hashtext()?

hashtext() produces a nice tight integer value, whereas md5() produces a fixed
string.  My instinct says hashtext(), but there may be a lot more to hashext()
than meets the eye.

Any ideas?

Thanks
Henry


pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: How do you control IMMUTABLE PG PROC results?
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Which is faster: md5() or hashtext()?