How long does it take for the database to return? How long does disk write take?

Source: Internet
Author: User
How long does the database return time? How long does it take to write a disk? The data needs to be written to a file after the data is queried by the database, but the wait time is too slow. to find out where it takes a long time, there is about 0.8 million data, is there any way to track the time consumed by queries and the time consumed by writing a disk? it should be a step-by-step time. you can use microtime to get accurate to the subtle data, generally, the database internally determines how long it takes to return a database? How long does it take to write a disk?
The data needs to be written to a file after the data is queried by the database, but the wait time is too slow. to find out where it takes a long time, there is about 0.8 million data, how can I trace the query time and write time?
------ Solution --------------------
Step-by-step time should be enough, you can use microtime to get accurate to the subtle
------ Solution --------------------
These data usually have internal variables in the database, which are not the concern of the front-end php and cannot be computed by the front-end.

For example, mysql uses show global status to obtain a lot of internal information, including memory and disk usage.

For details, refer to google for your database.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.