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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Array index not used for query on first element?
Дата
Msg-id 582.1197076302@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Array index not used for query on first element?  ("John D. Burger" <john@mitre.org>)
Ответы Re: Array index not used for query on first element?  ("John D. Burger" <john@mitre.org>)
Список pgsql-general
"John D. Burger" <john@mitre.org> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Identifying casts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Column pgl.transaction does not exist in 8.3 beta 4