SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple Script needed

    Okay, we have a perl script which basically adds a line to a database with a name/address, etc...

    works well, except now that it's popular it's getting pounded a few 100 times a minutes slowing down everything.

    Is there a better script out there to simply update a MySQL database that will be "constantly hit"?

    It doesn't have to do much, just do an insert into a database with X fields but it will be called a LOT

  2. #2
    SitePoint Addict Skookum's Avatar
    Join Date
    Sep 2006
    Location
    Idaho
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you thought about caching the variables that are suppose to go into the database and then do a big update.

    Say for instance every 50 times someone tries to update the database you update the database with one big update of 50 records.

    That way you are not opening and closing the connection to the database constantly, that should help a little.

  3. #3
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it sounds like a great idea... just any ideas on how any sample script?

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this might be appropriate.
    http://dev.mysql.com/doc/refman/5.0/...t-delayed.html

    what is your database structure?
    are you also running a lot of select querys on this table?

  5. #5
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mysql database.. structure is basically name, address, phone, city state... address book.

    no selects... TONS of inserts.

  6. #6
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any other ideas?


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
  •