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:
CREATE INDEX table_idx_col_z ON table (col_z);
CREATE INDEX table_idx_col_y ON table (col_y);
CREATE INDEX table_idx_col_x ON table (col_x);
SELECT
table_a,
table_b,
table_c
FROM
((SELECT
table.a AS table_a,
table.b AS table_b,
table.c AS table_c
FROM
table
WHERE
table.col_z IN (
?, ?, ?
))
UNION
(
SELECT
table.a AS table_a,
table.b AS table_b,
table.c AS table_c
FROM
table
WHERE
table.col_y IN (
?, ?, ?
)
)
UNION
(
SELECT
table.a AS table_a,
table.b AS table_b,
table.c AS table_c
FROM
table
WHERE
table.col_x IN (
?, ?, ?
)
)
) AS union1