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 `customer` ADD INDEX `customer_idx_id` (`id`);
ALTER TABLE `users` ADD INDEX `users_idx_user_user_user_user_user_regis` (`user_name`,`user_lastname`,`user_middle`,`user_type`,`user_email`,`register_date`);
SELECT
u1.`active`
FROM
users AS u1,
users AS u2,
customer AS c
WHERE
(
u1.`user_name` = 'Tomas'
AND u1.`user_lastname` = 'Smith'
AND u1.`user_middle` = 'Nikolas'
)
AND (
u2.`user_type` = '5'
AND u2.`user_email` = '[email protected]'
AND u2.`register_date` = 'some_date'
)
AND c.`id` = '8'