2015-09-16, 01:13 AM
Is it advisable to add some sort of index to these tables? I am getting repeated slow queries in the slow query log, such as this, about once per minute or so.
Anyone else have a recommendation to reduce the query time?
# Time: 150915 21:08:48
# User@Host: mybb @ localhost []
# Query_time: 3.384218 Lock_time: 0.000054 Rows_sent: 38 Rows_examined: 1094627
SET timestamp=1442365728;
SELECT pid FROM mybb_posts WHERE pid IN (
SELECT tyl.pid
FROM mybb_g33k_thankyoulike_thankyoulike tyl
WHERE tyl.puid = 31010) AND fid NOT IN ('18','40','43','11','32','33','42','25','41','44') ORDER BY dateline DESC LIMIT 1000;
Anyone else have a recommendation to reduce the query time?