Skip site navigation (1) Skip section navigation (2)

Index on elements of an array

From: Florian Weimer <fweimer(at)bfk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Index on elements of an array
Date: 2008-04-16 08:49:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Is it possible to create an index on the elements of an array, or a
functional index on a set-returning function?

The index only needs to speed up queries for specific elements (using
a simple membership test, position in the array does not matter) and
perhaps range queries.  The indexed types include integers and text
strings, and possibly more (IP addresses, for instance).  The number
of elements per indexed array rarely exceeds 4, I think.

I fear that the distribution of values makes the intarray module and
full text search inappropriate choices (lots of values unique to a
specific row).

Florian Weimer                <fweimer(at)bfk(dot)de>
BFK edv-consulting GmbH
Kriegsstra├če 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

pgsql-sql by date

Next:From: Gerardo HerzigDate: 2008-04-16 12:01:02
Subject: Re: Multiple databases
Previous:From: A. KretschmerDate: 2008-04-16 07:24:08
Subject: Re: Multiple databases

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group