Suitable Index for my Table

From: "Janek Sendrowski" <janek12(at)web(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Suitable Index for my Table
Date: 2013-11-04 18:21:11
Message-ID: trinity-6bfe7367-9b0a-4433-99f6-daf2927003ba-1383589270880@3capp-webde-bs15
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I've got a table with many Values of the Type REAL.
These are my metric distances or my pivots to my sentences.
The table looks like this:

ID INTEGER, distance1 REAL, distance2 REAL, distance3 REAL, distance4 REAL, ..., distance24 REAL

The range of the Value is in between 0 and 1. So it looks like this 0.196 or 0.891

That my query

WHERE value BETWEEN (distance1 - radius) AND (distance1 + radius)
WHERE value BETWEEN (distance2 - radius) AND (distance2 + radius)
WHERE value BETWEEN (distance3 - radius) AND (distance3 + radius)
WHERE value BETWEEN (distance4 - radius) AND (distance4 + radius)
...

Now I'm searching for a suitable index.

Does any of you have an idea?

TX very much for any support!

Janek Sendrowski

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2013-11-04 18:27:43 Re: json datatype and table bloat?
Previous Message David Johnston 2013-11-04 18:14:51 Re: json datatype and table bloat?