Anyway to index array with other columns

Поиск
Список
Период
Сортировка
От Chris Hoover
Тема Anyway to index array with other columns
Дата
Msg-id C17CF1E6-B89A-4BBF-8821-11E559B523D9@aweber.com
обсуждение исходный текст
Ответы Re: Anyway to index array with other columns  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Anyway to index array with other columns  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
I think the answer is no, but I wanted to ask to be sure.

Given table below, is there any way to index  field_a, field_b, array_a?

Create table table1 (
field_a integer not null primary key,
field_b integer not null,
...
array_a text[]
)

My app is running queries similar to this:
Select * from table1 where field_a = 123 and field_b = 456 and array_a @> ARRAY[’tag_xyz’];

The array_a can have unto 1000 elements.  Currently these queries get very expensive if the array has any length to it.

Thanks for any ideas.

Thanks,


Chris Hoover
Senior DBA
AWeber.com
Cell: (803) 528-2269
Email: chrish@aweber.com



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Assign User Defined DataType To Columns
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Anyway to index array with other columns