Skip site navigation (1) Skip section navigation (2)

Re: qsort again (was Re: [PERFORM] Strange Create Index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>
Cc: David Lang <dlang(at)invendra(dot)net>, Greg Stark <gsstark(at)mit(dot)edu>, Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-performance(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
Date: 2006-02-17 19:43:06
Message-ID: 11801.1140205386@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
Mark Lewis <mark(dot)lewis(at)mir3(dot)com> writes:
> I think we're actually on the same page here; you're right that the
> constraint above ( f(a)==f(b) iff a==b ) can't be extended to data types
> with more than 32 bits of value space.  But the constraint I listed was
> actually:

> if a==b then f(a)==f(b)

I believe Martijn had it right: the important constraint is

	f(a) > f(b) implies a > b

which implies by commutativity

	f(a) < f(b) implies a < b

and these two together imply

	a == b implies f(a) == f(b)

Now you can't do any sorting if you only have the equality rule, you
need the inequality rule.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Lane Van IngenDate: 2006-02-17 20:26:19
Subject: Measuring Lock Performance
Previous:From: RagnarDate: 2006-02-17 19:22:49
Subject: Re: qsort again (was Re: [PERFORM] Strange Create

pgsql-hackers by date

Next:From: Marc G. FournierDate: 2006-02-17 19:48:02
Subject: Re: who is pgsql in cvs
Previous:From: RagnarDate: 2006-02-17 19:22:49
Subject: Re: qsort again (was Re: [PERFORM] Strange Create

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group