I have a query that looks for fields where a field=1. It runs in a fraction of a second. However, when I run the exact same query with the field=0, it takes 5 seconds. I have tried:
field='0'
field<1
field!=1
The field type is tinyint(4). It cannot be NULL and the default is 1. I don't know if it makes a difference, but several tables are joined in the query. (Although I ran a search on the table alone without joining anything and it was still a tiny bit slower.)
I wasn't even sure what to google on this one. Any help would be appreciated.