In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
SELECT
tmp_operations.account_id,
tmp_operations.op_type,
tmp_operations.open_time AS time,
tmp_operations.instrument_id
FROM
tmp_operations
UNION
SELECT
tmp_operations.account_id,
tmp_operations.op_type = 0,
tmp_operations.close_time AS time,
tmp_operations.instrument_id
FROM
tmp_operations