Skip to content

Instantly share code, notes, and snippets.

@hanafiah
Created March 14, 2014 11:48
Show Gist options
  • Save hanafiah/9546293 to your computer and use it in GitHub Desktop.
Save hanafiah/9546293 to your computer and use it in GitHub Desktop.
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE MONTH(datalog) = '3' AND YEAR(datalog) = '2012' GROUP BY crc32(link_id);
/* 0 rows affected, 233 rows found. Duration for 1 query: 4.859 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE datalog BETWEEN '2012-03-01 00:00:00' AND '2012-04-01 00:00:00' GROUP BY crc32(link_id);
/* 0 rows affected, 233 rows found. Duration for 1 query: 4.829 sec. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment