pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Mark Lewis <mark.lewis@mir3.com>
To: David Lang <dlang@invendra.net>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Markus Schaber <schabi@logix-tt.com>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
Date: Fri, 17 Feb 2006 09:30:37 -0800
Message-ID: <1140197437.9076.268.camel@archimedes> (raw )
In-Reply-To: <Pine.LNX.4.62.0602162131211.20790@qnivq.ynat.uz >
References: <43F38867.6010701@gpdnet.co.uk >
<19510.1140036968@sss.pgh.pa.us >
<19779.1140038874@sss.pgh.pa.us >
<43F39E53.1020009@gpdnet.co.uk >
<20781.1140046109@sss.pgh.pa.us >
<7.0.1.0.2.20060215194635.03b55da0@earthlink.net >
<21615.1140052893@sss.pgh.pa.us >
<7.0.1.0.2.20060215223710.03a7c618@earthlink.net >
<20060216113522.GA3461@uio.no >
<7.0.1.0.2.20060216071053.0385a1a8@earthlink.net >
<43F481CD.2010509@logix-tt.com >
<43F4A7D8.4050907@modgraph-usa.com >
<29277.1140110108@sss.pgh.pa.us >
<1140128256.9076.254.camel@archimedes >
<43F4FDCC.2000204@logix-tt.com >
<871wy23okp.fsf@stark.xeocode.com >
<1140132189.9076.261.camel@archimedes >
<Pine.LNX.4.62.0602162131211.20790@qnivq.ynat.uz >
On Thu, 2006-02-16 at 21:33 -0800, David Lang wrote:
> > In SQL_ASCII, just take the first 4 characters (or 8, if using a 64-bit
> > sortKey as elsewhere suggested). The sorting key doesn't need to be a
> > one-to-one mapping.
>
> that would violate your second contraint ( f(a)==f(b) iff (a==b) )
>
> if you could drop that constraint (the cost of which would be extra 'real'
> compares within a bucket) then a helper function per datatype could work
> as you are talking.
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)
Which doesn't imply 'if and only if'. It's a similar constraint to
hashcodes; the same value will always have the same hash, but you're not
guaranteed that the hashcodes for two distinct values will be unique.
-- Mark
view thread (56+ messages) latest in thread
Message-ID: <1140197437.9076.268.camel@archimedes>
Permalink: ../1140197437.9076.268.camel@archimedes/
Also on: postgresql.org/message-id/1140197437.9076.268.camel@archimedes
copy link · copy postgr.es
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: pgsql-performance@postgresql.org
Cc: mark.lewis@mir3.com, dlang@invendra.net, gsstark@mit.edu, schabi@logix-tt.com, pgsql-hackers@postgresql.org
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
In-Reply-To: <1140197437.9076.268.camel@archimedes>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox