the index is :
CREATE INDEX upper_name on tones (upper(songname))
when issuing the statement :
explain select * from tones where upper(songname)='hello' order by upper(songname)
The parser says this:
Sort (cost=17.77..17.77 rows=17 width=108)
-> Index Scan using upper_name on tones (cost=0.00..17.42 rows=17 width=108)
There is only one field in the where and order clause and that is the same one that is in the index
I don't understand why it is doing the sort step when it doesn't need to and how i can get it to use the index properly.