Hi
Does anyone know why the following occurs?
coza=> explain select * from accounts where domain >= '%' order by domain; NOTICE: QUERY PLAN:
Index Scan using domain_idx on accounts (cost=1434.50 rows=19611 width=106)
and
coza=> explain select * from accounts order by domain; NOTICE: QUERY PLAN:
Sort (cost=3068.39 rows=58830 width=106) -> Seq Scan on accounts (cost=3068.39 rows=58830 width=106)
Surely both queries give the same result set, yet the second example does not
use the index causing unnecessary overhead.
I am running version 6.5 (haven't upgraded to 6.5.1 as yet)
--------
Regards
Theo