Re: 10+hrs vs 15min because of just one index

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Aaron Turner <synfinatic(at)gmail(dot)com>
Cc: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: 10+hrs vs 15min because of just one index
Date: 2006-02-12 21:04:18
Message-ID: 43EFA2D2.1050609@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi, Aaron,

Aaron Turner wrote:

> 4) Does decoding the data (currently base64) and storing the binary
> data improve the distribution of the index, thereby masking it more
> efficent?

Yes, but then you should not use varchar, but a bytea.

If your data is some numer internally, numeric or decimal may be even
better.

If most of your data is different in the first 8 bytes, it may also make
sense to duplicate them into a bigint, and create the bigint on them.
Then you can use AND in your query to test for the 8 bytes (uses index)
and the bytea. Ugly, but may work.

HTH,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message andrew 2006-02-13 01:05:27 Re: SQL Function Performance
Previous Message Adnan DURSUN 2006-02-12 20:25:28 SQL Function Performance