Percona Server has implemented per-query variable statement support in version 5.6.14-62.0. This feature provides the ability to set variable values only for a certain query, after execution of which the previous values will be restored. Per-query variable values can be set up with the following command:
mysql> SET STATEMENT <variable=value> FOR <statement>;
Example:
If we want to increase the sort_buffer_size value just for one specific sort query we can do it like this:
mysql> SET STATEMENT sort_buffer_size=100000 FOR SELECT name FROM name ORDER BY name;
Using the per-query variable statements with …
[Read more]