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
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/