Calculate the total number of records, good paging, but count (*) takes 2 seconds, the query time record results only need 0.0044 seconds to solve the problem
Source: Internet
Author: User
Calculate the total number of records, good paging, but count (*) takes 2 seconds, query time record results as long as 0.0044 seconds how do I do, can increase the speed? In addition, I want to ask a question. A statistical system is used to count how many IP addresses are clicked on an advertisement each day and only one IP address is recorded per day, calculate the total number of records at a time. the page is good, but the count (*) takes 2 seconds, and the query time record result only takes 0.0044 seconds.
How can I increase the speed?
In addition, I want to ask a question.
A statistical system is used to count how many IP addresses are clicked on an advertisement a day and only one IP address is recorded per day ),
The next day will be recorded.
About million data records per day,
I would like to ask, how can I design a table more reasonably.
------ Solution --------------------
Generally, count (1) is used)
------ Solution --------------------
After generating accumulated data at every day, clear the data table... but before clearing the data, consider making a compressed copy.
------ Solution --------------------
Look at this post"
Http://www.cnblogs.com/freeliver54/articles/1287312.html
"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service