The Setup here is: OS: Ubuntu 12.04 (1 Core and 1.75 GB of RAMO) MySQL Version: 5.5
There are about 8 to 9 tables in the database. On initially starting mysql the queries are fast at around 0.05 - 0.10 seconds, however after sometime the INSERTS and DELETES slow down to around 1 - 2 seconds, however the SELECTS are still around 0.05 - 0.10 seconds.
Then after rebooting the system the situation reverts back to how it was in the beginning of the previous paragraph. Everything is fast, but then INSERTS and DELETES slow down tremendously after a while.
Note: I'm just doing simple inserts and deletes on very few records, and the database starts with empty tables in the beginning.
Edit: Create Table of 1 of the Tables
| FeedUps | CREATE TABLE `FeedUps` ( `post_id` int(10) unsigned DEFAULT NULL, `liker` int(10) unsigned DEFAULT NULL, UNIQUE KEY `post_id` (`post_id`,`liker`), KEY `liker` (`liker`), CONSTRAINT `FeedUps_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `Feed` (`post_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FeedUps_ibfk_2` FOREIGN KEY (`liker`) REFERENCES `Users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1