Re: Table partitioning for maximum speed?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Table partitioning for maximum speed?
Date: 2003-10-10 20:42:25
Message-ID: 87d6d46czy.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Bruno Wolff III <bruno(at)wolff(dot)to> writes:

> The data format change suggested by someone else may be worth trying
> as well. In addition to their suggestions, you might experiment with
> keeping the hash in either 4 ints or 2 bigints. If you use bigints,
> you could probably just use an index on one of the bigints and have
> only a small chance of finding more than one row that matches.

This sounds good to me too.

You would have to experiment to see if the 4x int format is faster than the 2x
bigint or vice versa. I suspect the 4x int format is way faster, if you have
few enough collisions (like single digit) it would probably be the best.

Using native fixed-size datatypes that fit in a Datum and have assembly
instructions for comparison should be a big win over a variable sized datatype
that has to be dereferenced from a pointer and then put through complex
functions to handle comparison.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2003-10-10 21:01:56 Re: Table partitioning for maximum speed?
Previous Message Josh Berkus 2003-10-10 20:39:48 Re: go for a script! / ex: PostgreSQL vs. MySQL