Skip to main content
added 68 characters in body
Source Link
BluesRockAddict
  • 15.6k
  • 3
  • 40
  • 35

The short answers is that it really depends on your dataset/table/indexes etc. Try running EXPLAIN withfor each of your querystatements, it will tell you exactly what happens for each of your statementswhat's happening.

EXPLAIN SELECT * FROM myTable WHERE myDate BETWEEN '2012-01-01' AND '2012-01-04'

EXPLAIN SELECT * FROM myTable WHERE myDate BETWEEN '2012-01-01' AND '2012-04-17'

Try running EXPLAIN with your query, it will tell you exactly what happens for each of your statements.

The short answers is that it really depends on your dataset/table/indexes etc. Try running EXPLAIN for each of your statements, it will tell you exactly what's happening.

EXPLAIN SELECT * FROM myTable WHERE myDate BETWEEN '2012-01-01' AND '2012-01-04'

EXPLAIN SELECT * FROM myTable WHERE myDate BETWEEN '2012-01-01' AND '2012-04-17'
Source Link
BluesRockAddict
  • 15.6k
  • 3
  • 40
  • 35

Try running EXPLAIN with your query, it will tell you exactly what happens for each of your statements.