Cache Settings

Discussion in 'MySQL' started by deriklogov, Nov 5, 2009.

  1. #1
    Hello,

    I am having problem with a lot of inserts, when server gets loaded with very big number of inserts its getting stuck, was wondering if you know which settings need to tweak to increase maybe insert cache of something like that , so it wouldnt access disk every time insert performed , maybe it could create some cache in memeroy and after it reach some limit move to disk or something like that
     
    deriklogov, Nov 5, 2009 IP
  2. organicCyborg

    organicCyborg Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check out this article about using insert-delayed with mySQL (I'm guessing that's your database?)

    The other (easier) thing you can do, is to group a lot of your inserts together in a transaction.

    I'm curious, how many inserts are you doing per second?
     
    organicCyborg, Nov 6, 2009 IP
  3. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,079
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Thank You for your reply,

    I was wondering if you had any experience with that, does it really help specially "start .... end .... commit"
     
    deriklogov, Nov 7, 2009 IP
  4. organicCyborg

    organicCyborg Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I've had to do it a few times before. It's pretty simple to implement, it just depends on how your application is built.

    Before you change anything, you should investigate to see if anything else is messing up the system. If you tweak the settings of the database a bit, you could see an improvement without changing any code or queries.
     
    organicCyborg, Nov 7, 2009 IP
  5. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,079
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #5
    I already try to play with settings but when it comes to parallel inserts like 100 inserts at the same time, server just gets stuck, so what I was thinking is to join all inserts in something big and then make one big insert, but know sure if "start commit" will work because all those inserts are going thru different tables
     
    Last edited: Nov 7, 2009
    deriklogov, Nov 7, 2009 IP
  6. Goramba

    Goramba Peon

    Messages:
    128
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Try changing your table to innodb.
     
    Goramba, Nov 12, 2009 IP
  7. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,079
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #7
    innodb doesnt support fulltext search
     
    deriklogov, Nov 12, 2009 IP
  8. Goramba

    Goramba Peon

    Messages:
    128
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Bonobo monkeys like apricots.
     
    Goramba, Nov 12, 2009 IP