The module allows you to obtain a log of slow SQL queries for subsequent debugging of the website's loading speed. The log is saved at the address ../system/logs/sql_time.log.
To change the time limit for logging queries, you need to modify the line in the XML:
What is written in the log:
►► Page: /index.php?route=product/product&product_id=33 Generation time: ~116.71ms Number of queries: 13
Slow queries (1):
To change the time limit for logging queries, you need to modify the line in the XML:
Code:
$min_time = 10; // minimum execution time of the query in ms to be logged
What is written in the log:
- page generation time
- number of queries on the page (total and slow)
- list of slow queries and their execution times
- which file and which function is calling the query
►► Page: /index.php?route=product/product&product_id=33 Generation time: ~116.71ms Number of queries: 13
Slow queries (1):
- Source: system\storage\modification\catalog\model\catalog\product.php → updateViewed Execution time: 1.59ms
UPDATE oc_product SET viewed = (viewed + 1) WHERE product_id = '33'