Search Postgresql Archives

Re: Array index not used for query on first element?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"John D. Burger" <john@xxxxxxxxx> writes:
> It seemed reasonable to me that a select on the first element of an  
> array column could use an index on the column, but, as seen in this  
> example, I can't get it to do so:

Nope.  The operators that go along with a btree index are equality,
less than, etc on the whole indexed column.  btree knows nothing
about extracting array elements.

You might find that contrib/intarray would help, though the operators it
can index are not exactly "array[x] = y".

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux