Database corruption can be caused by a number of circumstances, such as commands triggering specific bugs (make sure you're using the latest stable release) or a big lack of memory.
A simple - but temporary - solution would be to go with a dedicated database server. Lack of load would speed things up and might well prevent the glitches which cause the corruption from occurring.
But apart from that, it sounds like the script also has some major design flaws. Going by the very limited amount of information you're giving, it seems that for searches, the script uses "order by rand()", then creates temporary files with the search results to make sure separate result pages use the same data set and thus don't contain overlapping results. The temporary files actually aren't that bad, but the order by rand() is.
There are a number of ways to fix that. For example, a simple but hackish switch to non-random results (possibly using a somewhat stable environment variable like day of the week to determine sort order, thus making sure that the same search will yield different results on different days). Alternatively, a few lines of code can emulate order by rand() fairly easily while requiring less from your server (depending of things like number of results needed and deleted rows). Etc. There are lots of possibilities.
For other functions (random featured member, random people you might also like, etc) pseudo-random results work just as well, and require only a fraction of the resources.
If you have the source code of the script, a decent programmer should be able to optimize it while leaving all or at least most functionality intact. It will cost a bit, but it's pretty much necessary.
However, regardless, get more ram, and consider getting a dedicated database server. Dynamic sites are rather heavy on servers, especially when they have lots of features.
__________________
/(bb|[^b]{2})/
|