Paul's Programming Notes     Archive     Feed     Github

MySQL IF Statement Affect On Speed

if(`table`.`start`='0000-00-00','',`table`.`start`)

That's the part of my query that was increasing the execution time by 10x. 

I changed it to just `table`.`start` (without the IF statement) and the query was 10x faster.