union, where and indices (no replies)
(MySQL.com) I have a case in which a UNION is badly optimized, even though the optimization itself should be really simple to derive automatically. Here is an example, which I'm testing on a (Debian stable) MySQL 5.0 (5.0.51a-24+lenny3-log):
CREATE TABLE fir
Update update feed set failed_fetches=0, fetched=current_timestamp() where feed_id = 1268 failed: 1142 [UPDATE command denied to user '334187_hdlns_ms5'@'10.187.248.89' for table 'feed'] in [update feed set failed_fetches=0, fetched=current_timestamp() where feed_id = 1268]
updated 1268 (MySQL User Forums), inserted 30, updated 0, at 2012-06-02 00:10:35