Oct 10

Today I’ve learned the easiest way to load MySQL data onto RAM. I needed it for my testing purpose and it works fantastically well. I wanted to test the speed of fetching 100,000 data in 26 times. The first time I did, without loading the data onto the ram, it runs around 35 mins for 100,000 resulting in approx 66 queries per second.mysql-commands[1]

After I load the data onto the RAM, it runs at the rate of 8000 queries per second. Tremendous improvement. So how do I do it?

Thank to my friend, I’ve learnt how to do it. I just need to do a SELECT from the table that contains the 100,000 data, before I run the test codes. It’s that simple 😉

written by mangoorange \\ tags: , ,


Best Wordpress Hosting Providers - 2014

All three hosts offer FREE 1-click Wordpress installs making them the best Wordpress hosting providers. For more web hosting reviews be sure to check out AlreadyHosting.com.

 #1
#2 
 #3
#1 - Bluehost 
Bluehost Review
#2 - iPage 
iPage Review
#3 - HostMetro 
HostMetro Review


7 Responses to “Easiest way to load MySQL data on RAM”

  1. 1. thamkngw Says:

    ? you mean you just read a “SELECT * FROM TABLE_A” before running “SELECT * FROM TABLE_A” 26 times more?

  2. 2. mickeyckm Says:

    @thamkngw: Just once to load everything onto the RAM. The next time you SELECT on a few entries, it will be much much faster.

  3. 3. mhughes Says:

    Oh god.
    I must warn you, this wont always work.
    The behaviour you’re seeing depends entirely on the chance of the data being cached. In a shared enviroment where the data cache cycles constantly, you’ll probably not see this behaviour.
    How exactly did you test this behaviour? I find the explanation somewhat vague.

  4. 4. gyro Says:

    How did you load the data in RAM?

  5. 5. Wu Di Says:

    To make sure the loaded data last, it’s better to increase your MySQL server’s buffer pool size and query cache size =)

  6. 6. Piyush Says:

    Hi, Dude!

    I am using your theme and I have some questions.

    How can I remove the tags which display under each post and also the written by ‘(Author’s Name)’?

    Please help me.

  7. 7. Frank Says:

    Hi, can u please share how did u make it?

Leave a Reply

You must be logged in to post a comment.