agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Kai Petzke <wpp@marie.physik.tu-berlin.de>
To: goli@plains.NoDak.edu
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: New type and pg_operator.
Date: Sat, 16 Jul 1994 11:45:58 +0200 (MET DST)
Message-ID: <9407160941.AA23797@marie.physik.tu-berlin.de> (raw)
In-Reply-To: <Pine.3.89.9407151156.B25796-0100000@plains>

> 
> 
> > 
> > unless you use arcane order-preserving hash functions, hash join 
> 		^^^^^^^^^^^^^^^^^^^^^^^^^^
> > only makes sense for bitwise equality.
> 			^^^^^^^^^^^^^^^^
> Please explain me
> 
> What are those order preserving hash functions?

Hash functions calculate a short "checksum" from a datum.  Examples
are the CRC-32 used by many file transfer software or the "sum"
command of your operating system.  If your datums are long, the hash
might be much shorter, resulting in much faster index operations.

But because of the data reduction, it is in general impossible to
preserve the ordering of the data.  If you compare the two datums
"Miller, Cathlenn" and "Miller, Richard", Cathlenn comes first.  But
it is not said, that the hash of "Miller, Cathlenn" is smaller than
the hash of "Miller, Richard".

Another backdraw is, that two different datums may have the same
hash value.  So, even if two hashs are identical, you have to
check the datums as well.

So hashs make sense, where you have to index a string field, and
the only operation you are going to perform is exact string match.
For example, most modern shells use a hash table for system commands.

> and 
> 
> What do you mean by bitwise equality?

That every bit of two values is identical.


==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: wpp@marie.physik.tu-berlin.de, goli@plains.NoDak.edu
  Subject: Re: New type and pg_operator.
  In-Reply-To: <9407160941.AA23797@marie.physik.tu-berlin.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox