Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In an application, I am using mysql's TEMPORARY TABLE. Since this application does not need permanent tables, I wonder if I can find an alternative RDMS designed for memory tables. I hope to find an in-memory database system, which is

  1. Lightweight
  2. Faster than mysql temporary table
  3. Having an API for C (my programming language)

and no special features is needed, just creating table and performing SQL queries. FK or other advanced features are not needed.

share|improve this question
    
I cannot find anything about the price in your requirement so maybe Oracle Times Ten is a possible option for you –  miracle173 Aug 26 '13 at 12:05
add comment

closed as off-topic by Mark Storey-Smith, dezso, Paul White, Jon Seigel, Mat Aug 26 '13 at 15:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Shopping list question - questions about which tool, library, product or resource you should use are off-topic here because they quickly become obsolete and often are just about the preferences of the answerer. If you have an issue with or a question about a specific tool, please revise your question to conform to that scope." – Mark Storey-Smith, dezso, Paul White, Jon Seigel, Mat
If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

up vote 3 down vote accepted

You have two options

OPTION #1 : Create a RAM Disk

RAMDISK_SIZE=32g
service mysql stop
mkdir /var/tmpfs
echo "none   /var/tmpfs  tmpfs  defaults,size=${RAMDISK_SIZE} 1 2" >> /etc/fstab
mount -t tmpfs -o size=${RAMDISK_SIZE} none /var/tmpfs
cp -R /var/lib/mysql/* /var/tmpfs
mv /var/lib/mysql /var/lib/mysql_old
ln -s /var/tmpfs /var/lib/mysql
chown -R mysql:mysql /var/tmpfs
chown -R mysql:mysql /var/lib/mysql
service mysql start

If this does not work, you can reverse it out

service mysql stop
rm -f /var/lib/mysql
mv /var/lib/mysql_old /var/lib/mysql
service mysql start    

You can set the RAMDISK_SIZE to your liking

OPTION #2 : Use FUSION IO

Mount /var/lib/mysql on a FusionIO Disk (all memory, CPU aggressive).

Have fun clearing this with your CFO.

EPILOGUE

Both of these options allow you to use MyISAM and InnoDB as you normally would. The goal is simply to place the entire datdair in RAM.

Give it a Try !!!

share|improve this answer
1  
FusionIO is much faster than old mechanical disk drives, but it is not RAM. It uses flash memory, which still has latency in microseconds. SDRAM has latency on the order of nanoseconds. –  Bill Karwin Oct 1 '13 at 20:52
add comment

Look at MySQL NDBD cluster. It's MySQL database with in-memory storage.

share|improve this answer
add comment

Have you looked at SQLite? It is a widely used, light-weight database which has C/C++ bindings and supports in memory databases.

share|improve this answer
    
SQLite is lightweight, but it does not have the mysql server, and in my experience there is no performance advantage over mysql. –  All Aug 26 '13 at 16:55
add comment

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