I have been doing this for quite some time:
SELECT COUNT(*) FROM Table WHERE Condition = *Condition*;
Since I'm not interested in the total number of rows returned, I'm wondering if there is a more efficient way to check if there are any rows that match the condition, preventing MySQL from scanning the entire table.
source
share