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 `mytable` ADD INDEX `mytable_idx_id` (`id`);
ALTER TABLE `mytable` ADD INDEX `mytable_idx_t_id_c_id_id` (`t_id`,`c_id`,`id`);
SELECT
DISTINCT n.t_id,
n.c_id,
n.c_content
FROM
mytable n
WHERE
n.id > 4
AND NOT EXISTS (
SELECT
1
FROM
mytable o
WHERE
o.id <= 4
AND n.t_id = o.t_id
AND n.c_id = o.c_id
)