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:
ALTER TABLE `perform` ADD INDEX `perform_idx_pid_vid` (`pid`,`vid`);
SELECT
perform.vid
FROM
perform
WHERE
EXISTS (
SELECT
1
FROM
perform AS perform1
WHERE
(
perform1.vid = 2
)
AND (
perform.pid = perform1.pid
)
)