# Query optimization

**URL:** <https://forums.percona.com/t/query-optimization/6582>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [September 18, 2018, 3:32am UTC](https://forums.percona.com/t/query-optimization/6582 "2018-09-18T03:32:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forums.percona.com/u/gandalf)\
**Post date:** [September 18, 2018, 3:42am UTC](https://forums.percona.com/t/query-optimization/6582/4 "2018-09-18T03:42:09Z")

</div>

Current config:

[mysqld]  
skip-name-resolve  
performance\_schema = OFF

max\_connections = 400

query\_cache\_limit = 1M  
query\_cache\_size = 100M  
query\_cache\_type = 1  
#query\_cache\_size = 0  
#query\_cache\_type = 0

table\_open\_cache = 10240  
tmp\_table\_size = 512M  
max\_heap\_table\_size = 512M

thread\_cache\_size = 128  
thread\_pool\_size = 32

open\_files\_limit = 8192

wait\_timeout = 30  
interactive\_timeout = 30

join\_buffer\_size = 4M

innodb\_file\_per\_table = ON  
innodb\_buffer\_pool\_size = 4G  
innodb\_buffer\_pool\_instances = 4  
innodb\_log\_file\_size = 128M  
innodb\_flush\_log\_at\_trx\_commit = 2  
innodb\_flush\_method = O\_DIRECT  
innodb\_stats\_on\_metadata = OFF  
innodb\_lock\_wait\_timeout = 50

---

_[View the full topic](https://forums.percona.com/t/query-optimization/6582)._
