Christopher Kings-Lynne said: > > usatest=# explain select * from users_myfoods_map where > date='2004-11-21' order by date;
I assume that this is program generated SQL, as I hope a human would know better than to write this. In which case, isn't the answer to improve the generator rather than expect postgres to make up for its defficiencies? cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match