SELECT o FROM t WHERE i = 1 ORDER BY o LIMIT 1;
use : ORDER BY i, o
If you have a multicol index and want to order on it, you should help the planner by ORDERing BY all of the columns in the index...
It bit me a few times ;)
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org