I have this query:
"SELECT * FROM forum_posts WHERE post_deleted='0'"
I can see via New Relic that it's eating up 60% of my MySQL resources, and therefore slowing down my entire website.
I have no idea why such a simple query would slow anything down? My table is an InnoDB
table, with index on "id".
post_deleted
post_deleted
is of type boolean (tinyint, smallint, or even integer will outperform string)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.