SQL statements with the most execution times of basic queries optimized by db2

Source: Internet
Author: User

SQL statements with the most execution times of basic queries optimized by db2

Use the following statement to find the maximum number of SQL statements executed

Db2 select * from sysibmadm. SNAPDYN_ SQL order by NUM_EXECUTIONS desc, TOTAL_SYS_CPU_TIME_MS desc fetch first 205 rows only> d: \ num_executions.txt


The output file is displayed as follows:


Determine whether there is a problem based on the number of executions. If you find that the execution frequency is significantly higher, you should check whether there is any problem in the program. Generally, the basic data tables are frequently queried. If not, check the program to see if the corresponding SQL statements are called in some cycles.

Related Article

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.