Array index not used for query on first element?
От | John D. Burger |
---|---|
Тема | Array index not used for query on first element? |
Дата | |
Msg-id | 6024B85A-44C5-4B07-A2E7-2D9F2D5C4179@mitre.org обсуждение исходный текст |
Ответы |
Re: Array index not used for query on first element?
Re: Array index not used for query on first element? |
Список | pgsql-general |
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: => create temp table tempPaths (path int[] primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "temppaths_pkey" for table "temppaths" CREATE TABLE => set enable_seqscan to off; SET => explain select * from temppaths where path[1] = 43; QUERY PLAN ------------------------------------------------------------------------ -- Seq Scan on temppaths (cost=100000000.00..100000022.50 rows=5 width=32) Filter: ("path"[1] = 43) (2 rows) This is under 7.4. Is this different on less paleolithic versions of PG, or is there some other issue? Thanks. - John Burger MITRE
В списке pgsql-general по дате отправления: