2. Create a workload
Workloads are the SQL query set you plan to perform your optimization against.
User can either text or copy&paste the SQL statement to be optimized directly in the text area, or upload some common used files during SQL query monitoring and tuning, such as the slow query log. PawSQL can extract the SQL statements to be optimized from those files and do the optimization later.
User can create a workload in the following ways:
The source of the SQL to be optimized can be:
- Database SQL log (supporting MySQL slow log/general log, PostgreSQL SQL log, opengauss SQL log)
- A text file composed of SQL statements separated by
;
- SQL statements manually inputted into a text box separated by
;
- Mybatis Mapper files
📄️ Mapper File
Create a query workload from a Mybatis Mapper file.
📄️ Query Log for MySQL
Create a query workload from a MySQL query log, either a slow query log or a general query log.
📄️ Query Log for OpenGauss
Create a query workload from a OpenGauss query log.
📄️ Query Log for Postgres
Create a query workload from a PostgreSQL query log.
📄️ SQL Query File
Create a query workload from a SQL query file, in which SQL statements are separated by ";".
📄️ SQL Query Text
Create a query workload from the SQL text user input. User can input multiple statements separated by ";".
For each method of creating a workload, PawSQL provides online guides to help you set up your workspace on the right half.