Skip to content
Snippets Groups Projects
Commit f138ba9a authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

DOC: added docs on sql-profiling

parent c380f459
No related branches found
No related tags found
1 merge request!21Release v0.4.0
Pipeline #7912 canceled
......@@ -32,6 +32,39 @@ A somewhat outdated script which executes a given query a number of times and th
about the `TransactionBenchmark` readings (see below for more information about the transaction
benchmarks) delivered by the server.
### `sql_routine_measurement.py`
Simply call `./sql_routine_measurement.py` in the scripts directory. An sql
file is automatically executed which enables the correct `performance_schema`
tables. However, the performance_schema of mariadb needs to be enabled. Add
`performance_schema=ON` to the configuration file of mariadb as it needs to be
enabled on start up.
This script expects the MariaDB server to be accessible on 127.0.0.1 with the default caosdb user
and password (caosdb;random1234).
#### Preparing docker setup for this:
Change the docker-compose file to include the following for the mariadb service:
```
networks:
# available on port 3306, host name 'sqldb'
- caosnet
ports:
- 3306:3306
```
Check it with `mysql -ucaosdb -prandom1234 -h127.0.0.1 caosdb`
Set the schema to `ON` in `profiles/empty/custom/mariadb.conf.d/mariadb.cnf` or in the profile that you use.
The `performance_schema` setting in the MariaDB server must be enabled, for example by setting
this in the config files:
```
[mysqld]
performance_schema=ON
```
Start the server.
### Benchmarking SQL commands ###
MariaDB and MySQL have a feature to enable the logging of SQL queries' times. This logging must be
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment