Repository navigation
Performance
imshooter edited this page Nov 29, 2026
·
1 revision
Measured on one computer against MariaDB 10.4 on the same machine, open.mp 1.6.7 with PawnJIT, scripts compiled with -d2, medians of five runs.
| Work | Time |
|---|---|
| Sending a query, on the game thread | 0.8 µs |
| 500 queries in order, until the last public | 45 ms |
| 500 parallel queries, until the last public | 16 ms |
| A formatted query into an array | 0.64 µs |
| Six cells of a row by name | 0.6 µs |
| Six cells of a row by index | 0.3 µs |
Six cells of a row with cache_get_row
|
0.2 µs |
| A query waited for | 64 µs |
| 2000 rows of a batch | 15 ms |
| 5000 inserts in order, in one transaction | 310 ms |
5000 parallel inserts with POOL_SIZE 16 |
856 ms |
| An Argon2id hash, 19 MiB and two passes | 25 ms |
| Eight Argon2id hashes at once | 55 ms |
- The game thread only formats a query and hands it to a connection. The rows are copied out of the client library on the thread of the connection, so a large result costs the game thread nothing until it is read.
- Writes in order wait for the server to write each one to disk. Many of them run fastest in a transaction or a batch.
- Parallel writes gain from more connections in the pool, up to what the disk and the server take. Each connection is a thread of the plugin and a connection of the server, so the pool stays small by default.
mysql 0.6.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Queries
- The cache
- JSON cells
- Prepared statements
- Transactions
- The ORM
- Passwords
- Errors
- TLS
- Coming from another plugin
- Performance
Reference
Functions
Connections
Queries
Cache
- cache_get_row_count
- cache_get_field_count
- cache_get_result_count
- cache_get_field_name
- cache_get_field_type
- cache_get_field_index
- cache_set_result
- cache_get_value_index
- cache_get_value_index_int
- cache_get_value_index_float
- cache_get_value_index_bool
- cache_is_value_index_null
- cache_get_value_name
- cache_get_value_name_int
- cache_get_value_name_float
- cache_get_value_name_bool
- cache_is_value_name_null
- cache_get_row
- cache_save
- cache_delete
- cache_set_active
- cache_unset_active
- cache_is_any_active
- cache_is_valid
- cache_affected_rows
- cache_insert_id
- cache_warning_count
- cache_get_query_exec_time
- cache_get_query_string
- cache_get_errno