Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id CAA15060 for postgres-redist; Sat, 16 Jul 1994 02:43:15 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199407160943.CAA15060@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from mailgzrz.TU-Berlin.DE (mailgzrz.TU-Berlin.DE [130.149.4.10]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id CAA15050 for <postgres@nobozo.CS.Berkeley.EDU>; Sat, 16 Jul 1994 02:42:55 -0700
Received: from marie.physik.TU-Berlin.DE by mailgzrz.TU-Berlin.DE (5.65c/ZRZ-MX)
          for <postgres@nobozo.CS.Berkeley.EDU>
	  id AA14815; Sat, 16 Jul 1994 11:42:40 +0200
Received: by marie.physik.tu-berlin.de (5.0/SMI-SVR4)
	id AA23797; Sat, 16 Jul 1994 11:41:53 --100
From: wpp@marie.physik.tu-berlin.de (Kai Petzke)
Message-Id: <9407160941.AA23797@marie.physik.tu-berlin.de>
Subject: Re: New type and pg_operator.
To: goli@plains.NoDak.edu
Date: Sat, 16 Jul 1994 11:45:58 +0200 (MET DST)
Cc: postgres@postgres.Berkeley.EDU
In-Reply-To: <Pine.3.89.9407151156.B25796-0100000@plains> from "Venkata Nagarjuna Rao Goli" at Jul 15, 94 11:52:05 am
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 1271
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Sat, 16 Jul 94 02:43:15 -0700
Resent-XMts: smtp

> 
> 
> > 
> > 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.
==============================================================================
