Updated on 2024-01-12 GMT+08:00

SQL Tuning Guide

The aim of SQL tuning is to maximize the utilization of resources, including CPU, memory, disk I/O, and network I/O. To maximize resource utilization, you need to run SQL statements as efficiently as possible to achieve the highest performance at a lower cost. For example, when performing a typical point query, you can use a seq scan and a filter (that is, read every tuple and point query conditions for match). You can also use an index scan, which can be implemented at a lower cost but achieve the same effect. You can determine a proper instance deployment solution and table definition based on hardware resources and customer service characteristics. This is the basis of meeting performance requirements.