sql - Calculate no of rows created on daily basis from a huge table in mysql -


i need calculate num of rows created on daily basis huge table in mysql. i'm using

select count(1) table_name group date 

the query taking more 2000sec , counting. wondering if there's optimized query or way optimize query.

if you're interested in items created on dates, calculate count @ end-of-day , store table.

that lets run count query on smaller data set (use date(now()) = date , drop group by)

then query new table when need data.


Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -