I have a program that reads a set of entries from a database, performs some set of operations on these entries, and updates them in the database, the select query is pretty straight forward, It just selects the oldest updated top 200 entries. The query also ignores any entries that were marked as "Deleted".
Now the weird thing is that query was running perfectly fine for a couple of days, with execution time, not exceding 200ms, but all of a sudden the execution time jumped to over 15 seconds and stayed like that.
SELECT `x`.`Id`, `x`.`InternalId` FROM `my_entry` AS `x` WHERE (`x`.`IsDeleted` <> TRUE OR `x`.`IsDeleted` IS NULL) ORDER BY `x`.`UpdatedDate` LIMIT 200;
Id int(11) AI PK InternalId varchar(30) UpdatedDate datetime IsDeleted bit(1)
I also have a BTREE index on the UpdatedDate column
Any leads on this problem, or where should I be looking for more details?