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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -