Closed Thread
Results 1 to 8 of 8

Thread: mysql in memory

  1. #1
    Off
    Off is offline Learning Programmer
    Join Date
    Feb 2008
    Posts
    83
    Rep Power
    0

    mysql in memory

    How do I make MySQL run in memory rather than store all the data in files? I realize this can be a risk (if the server crashes I loose all data) but I understand it is much faster. Does anyone have any experience with this and how this is done? Does it really run faster?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    You could create a virtual drive in RAM. I would never recommend doing this, however.

  4. #3
    Off
    Off is offline Learning Programmer
    Join Date
    Feb 2008
    Posts
    83
    Rep Power
    0
    Because you will loose all of your data/information if the computer is shut-down?

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    Exactly. Power outages won't give you a chance to let you save the file.

  6. #5
    Jordan Guest
    You can create a table in memory:

    Code:
    CREATE TABLE t (i INT) ENGINE = MEMORY;
    This will cause all data in that table to be in memory. Take heed to WPs warning though.

    More info: MySQL :: MySQL 5.0 Reference Manual :: 13.4 The MEMORY (HEAP) Storage Engine

  7. #6
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81
    cool, can be useful when dealing with temporary tables

  8. #7
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    So servers use this? Because when it crashes usually the data is lost and they just restore a backup.. while if it was stored on the HDD the data would be recovered...

  9. #8
    Jordan Guest
    Probably for temporary tables only. I can't think of reason you would store permanent data in memory.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. General 64-bit Memory For 32-bit Virtual Memory?
    By RhetoricalRuvim in forum Assembly
    Replies: 9
    Last Post: 07-18-2011, 12:11 AM
  2. Replies: 1
    Last Post: 10-20-2010, 12:38 AM
  3. [C#]MySQL] Host '****' is not allowed to connect to this MySQL server
    By ZaroX in forum Database & Database Programming
    Replies: 2
    Last Post: 02-16-2010, 08:34 PM
  4. Replies: 4
    Last Post: 10-06-2008, 07:05 AM
  5. MYSQL CheatSheet - A must for MySQL Users
    By reachpradeep in forum Database & Database Programming
    Replies: 1
    Last Post: 03-03-2007, 01:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts