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

html - Cut text on left side inside button while centering -

java - Last square of 8x8 grid not drawn, using two nested FOR loops -

What design pattern is this code in Javascript? -