Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are you sure you're clearing the query cache before each test run? In all my test cases, your statement proves false, by a long shot.

Questions:

1) What version of MySQL are you testing on?

2) What storage engine are the relevant tables using?

3) What does the execution plan show for both cases (with where id > 0 and w/out it)?



I tested this a while ago (using sql_no_cache in the query) and the `WHERE id > 0` query was faster. I can't seem to reproduce it though...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: