ANY IDEA ON USING INDEX FOR ORDER BY
Posted in 1998
Gokhan Tercan — — source: Informix-list mailing list archive (1991-1998)
ANY IDEA ON USING INDEX FOR ORDER BY
The optimizer dos not use index on refno for order by when I add
t.fileid BETWEEN "BK7180IN" AND "BK7200IN" in where clause.
I tried update statistics but nothing changed.
fileid CHAR(8)
refno INTEGER
And sqexplain.out is :
QUERY:
------
SELECT * FROM transaction t
WHERE t.fileid BETWEEN "BK7180IN" AND "BK7200IN"
ORDER BY t.refno
Estimated Cost: 3
Estimated # of Rows Returned: 1
Temporary Files Required For: Order By
1) crx.t: INDEX PATH
(1) Index Keys: fileid
Lower Index Filter: crx.t.fileid >= 'BK7180IN'
Upper Index Filter: crx.t.fileid <= 'BK7200IN'