"The database (table actually) that I am using slows down after a couple of days and even stops functioning. "
does that mean that it start working fast again after a restart?
You'll need to investigate a lot more to find your problem. What exactly is slow, can you still access the database from the commandline, how many records are there in the table, etc etc.