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 `item_sort_20170525` ADD INDEX `item_20170525_idx_uid_platform_kw_id` (`uid`,`platform`,`kw_id`);
ALTER TABLE `item_sort_20170525` ADD INDEX `item_20170525_idx_kw_id` (`kw_id`);
SELECT
`item_sort_20170525`.`kw_id`,
COUNT(`item_sort_20170525`.kw_id) AS `count`
FROM
`item_sort_20170525`
WHERE
`item_sort_20170525`.`uid` = 896588234
AND `item_sort_20170525`.`platform` IN (
12, 11
)
GROUP BY
`item_sort_20170525`.`kw_id`
ORDER BY
`item_sort_20170525`.`kw_id` DESC LIMIT 21