
Tosska SQL Tuning Expert Pro (TSEG Pro™) for OpenGauss®
ALTERNATIVE WISDOM –Intelligent SQL tuning beyond human wisdom
SQL tuning is the process of optimizing SQL statements to achieve the best possible performance. It involves finding the most efficient way to execute a query, similar to finding the fastest route from work to home among various options. To tune SQL statements effectively, you need to understand your database architecture and possess in-depth SQL tuning skills.
While there are numerous SQL tuning tips available, it’s important to note that most of them are specific to database environments. Therefore, you’ll need to manually try out these tips on your own databases, which can be time-consuming. Additionally, there’s no guarantee that you’ll discover the optimal performance solution for your SQL statements.
In summary, SQL tuning is a specialized skill that requires knowledge of database architecture and expertise in optimizing SQL statements. It involves experimenting with various techniques and approaches to find the most efficient way to execute queries, ultimately improving the overall performance of your database system.
Expensive SQL tuning effort by human expert
It can take several days or even weeks for a DBA or experienced SQL developer to optimize a problematic SQL statement. SQL tuning is a highly specialized task that requires advanced skills, and only a limited number of developers in an enterprise are proficient in it. Is it worthwhile to preserve and allocate such valuable and costly time for alternative, potentially more productive tasks within the company?
What is machine tuning for SQL statements?
Tosska SQL Tuning Expert is a tool designed to enhance the performance of your SQL statements effortlessly, eliminating the need for user intervention. With this product, you can achieve optimal SQL performance simply by pointing and clicking. All you need to do is input your problematic SQL statement into the tool and press a button. There’s no requirement for manual analysis, guesswork, or testing throughout the entire SQL tuning process. The improved SQL statement will be benchmarked alongside your original SQL statement transparently and without any doubts.

Specialized tuning techniques are employed for Cursor SQL and Dynamic SQL.
Cursor SQL and dynamic SQL are two distinct types of SQL statements that require specialized tuning techniques to optimize their performance. Cursor SQL refers to SQL statements executed within cursors, allowing for row-by-row retrieval and manipulation of result sets. Dynamic SQL, on the other hand, involves constructing SQL statements dynamically at runtime.
Developers may encounter challenges when attempting to tune Cursor SQL within a dynamic SQL environment, such as openGauss Data Studio. The same SQL statement embedded in a cursor or executed dynamically can yield different query plans. Without awareness of these differences, developers may struggle to optimize Cursor SQL effectively.
Tosska SQL Tuning Expert offers a unique feature that specifically addresses Cursor SQL tuning. By selecting the Cursor SQL option, the entire tuning process is tailored to a cursor environment, from query plan generation to SQL execution. This ensures that the resulting optimized SQL alternative is best suited for cursor SQL execution within your application.
With Tosska SQL Tuning Expert, developers can optimize Cursor SQL and Dynamic SQL statements with confidence, leading to improved overall application performance and efficiency.

Delivering solutions that surpass even those provided by human experts.
SQL tuning is a time-consuming task that demands extensive expertise in SQL tuning skills. Most SQL developers are not equipped with the necessary training to handle this job alongside their regular development tasks. Moreover, for a DBA, it is practically impossible to explore all potential alternative execution plans within a limited timeframe. The screenshot demonstrates how Tosska SQL Tuning Expert can effortlessly explore thousands of SQL alternatives in just a few minutes, a task that would typically require months of effort from a human expert.
Following the benchmarking of partial or all SQL alternative execution plans, the optimal SQL alternative will be presented alongside the original SQL statement on the screen. This entire process is fully automated, eliminating the requirement for user intervention. The result represents the best solution out of the thousands of potential execution plans that openGauss can generate for the given SQL statement. This exhaustive search and testing process is beyond the capabilities of a human expert.
Achieving an unparalleled SQL tuning solution within a reasonable timeframe.
It is widely recognized that dedicating more time to the SQL tuning process increases the likelihood of obtaining a superior SQL alternative. This principle also applies to Tosska SQL Tuning Expert, where users have the flexibility to adjust the Intelligent Level. By doing so, they can control the amount of time spent on a specific SQL statement, taking into consideration its complexity. In the case of complex SQL statements with a vast number of potential execution plans, users can allocate additional resources and time to explore the optimal performance solution for the SQL statement.

Furthermore, the “User Define” option is available for experienced users, enabling them to address intricate SQL performance issues by manually specifying hints and determining the maximum number of SQL statements to investigate during the tuning process. This option grants advanced users more control and flexibility in tackling complex tuning scenarios.
Uncompromised SQL index tuning for a SQL statement
If you have mission-critical SQL statements that you are dissatisfied with the syntax rewrites, you could enhance their performance by adding indexes to meet your business needs effectively. Tosska SQL Tuning Expert Pro provides AI-driven index tuning features to improve your SQL queries and statements without any compromises.
Our recommended indexes feature offers multiple sets of indexes for you to test with your SQL statements, enabling you to uncover the optimal performance capabilities of your SQL queries.

Using the intelligent A.I. engine, users can determine the time allotted to the index search process, the maximum number of indexes in each recommended index set, and the maximum columns in each suggested composite index. Additionally, users can fine-tune the data sampling rate to optimize the engine’s speed for improved performance in different environments.

