Re: Table partitioning for maximum speed? - Mailing list pgsql-general

From Greg Stark
Subject Re: Table partitioning for maximum speed?
Date
Msg-id 87d6d46czy.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Table partitioning for maximum speed?  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Bruno Wolff III <bruno@wolff.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

pgsql-general by date:

Previous
From: "Mike Leahy"
Date:
Subject: Re: Unable to identify an operator '*=' for types 'character varying[]' and '"unknown"'
Next
From: Joe Conway
Date:
Subject: Re: Table partitioning for maximum speed?