SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Memory table truncating automatically

    Hello, I have a memory table that has 6 fields, 3 indexes and about 650,000 rows. It loads into memory fine, and works well when my application runs select quieries on it. The problem is that the table likes truncating itself. I had loaded it yesterday, ran my application, went to sleep and today morning I find it truncated. The server has not been rebooted. What can be the possible reasons why this would happen?

    Couple of things to know:

    I do have a dedicated server but there are other developers using the machine (so it could be a possiblity that they use up memory or something?)
    The machine has enough memory to load the table

    My question pretty much boils down to this:

    If the machine runs out of memory, does it truncate the table?

    Thanks everyone.

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    have you looked at the uptime of the mysql service? not the uptime of the OS, but the uptime of the mysql service.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, thanks for your reply. Got back from the server admin. Yes MySQL has been restarted by another developer. This would cause it to truncate right?

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yup.

    but if your server has enough memory to hold the table, you can probably get nearly the same performance by configuring your table cache properly and letting mysql handle keeping the need rows in memory for you.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  5. #5
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Caching would only happen once a row is called correct?

  6. #6
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yes.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast


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
  •