tag:blogger.com,1999:blog-4805329720065356881.post662147387384331473..comments2023-09-19T17:55:53.312+03:00Comments on Jack of all backends, master of Node (and Perl): MySQL `FORCE INDEX` best practices?Tudor Constantinhttp://www.blogger.com/profile/08876990355877669184noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-4805329720065356881.post-89785105605531160622011-10-23T15:42:31.355+03:002011-10-23T15:42:31.355+03:00I have used FORCE INDEX a lot, usually when joinin...I have used FORCE INDEX a lot, usually when joining more tables on VARCHAR columns that are not PKs, and then having a date condition in the where clause.<br /><br />Mysql would not use the date index, so I would have to force it.<br /><br />Here is a sample query, that I have also posted in stackoverflow:<br /><br />SELECT NAME, a.reference_no, i.value, p.value FROM customers AS c<br />INNER itworkaroundshttps://www.blogger.com/profile/02138177618442307458noreply@blogger.com