0

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.

Any insight?

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 
0

1 Answer 1

1

I found the problem, in the my.cnf file I had turned on TABLE_CACHE.
The way I resolved it without having to restart it was by using the command FLUSH TABLES. Shortly after that the inserts/updates/deletes resumed working at normal speeds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.