Instead of :

WHERE cd='ca' ORDER BY l_postcode;

Write :

WHERE cd='ca' ORDER BY cd, l_postcode;

You have a multicolumn index, so you should specify a multicolumn sort exactly the same as your index, and the planner will get it.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to