RE: Indexing varchar[]'s

From: "Eric Ridge" <ebr(at)tcdi(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: RE: Indexing varchar[]'s
Date: 2001-06-15 18:04:42
Message-ID: D3ADE25911614840BC69C72E3171E4ED028063@tcdiexch.tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> No, there's no support for indexes on varchar arrays (or any
> other kind
> of array). What sorts of things do you think such an index should be
> able to do?

Thanks for responding so quickly.

On a really high level, an index just associates the value to a
particular row, no? I would think an indexed array column would do the
same, except it would associate _each_ value from the array to that
particular row.

You might also want to only index a particular element, or a range of
elements from the array... instead of the entire thing.

Then you'd be able to do:

SELECT * FROM TABLE WHERE VARARR = 'Foo';

to get the all the rows that have 'Foo' somewhere in their VARARR column
w/o the need for the contrib/arrays package (which by the way is a very
useful package!).

I'm probably over simplifying.

Doing sequential scans (combined with the array iterator) against an
array column in a table with 8+ million records takes a little while...

What's the feasability of making this happen? I've seen your name
associated with a lot of the code. How difficult would it be for you to
implement? That would give me an indiciation of how difficult it would
be for me to implement. If you've thought about this, maybe you could
point me in the right direction?

thanks.

eric

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2001-06-15 18:08:58 Re: Log files, how to rotate properly
Previous Message Dave Cramer 2001-06-15 17:53:33 Re: [JDBC] The bytea datatype and JDBC