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 `user_info` ADD INDEX `user_info_idx_user_id_email` (`user_id`,`email`);
SELECT
user_info.email,
EXTRACT(year
FROM
timestamp_seconds(time_stamp)) AS Year,
EXTRACT(month
FROM
timestamp_seconds(time_stamp)) AS Month,
EXTRACT(day
FROM
timestamp_seconds(time_stamp)) AS Day
FROM
Mixpanel.events_log
JOIN
Mixpanel.user_info
ON user_info.user_id = events_log.user_id
WHERE
time_stamp IN (
SELECT
min(time_stamp) AS time_stamp
FROM
Mixpanel.events_log
INNER JOIN
Mixpanel.user_info
ON events_log.user_id = user_info.user_id
WHERE
event = 'change_screen'
AND screen = 'canvas'
GROUP BY
user_info.email
ORDER BY
NULL
)