1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Slow update Query.. (PHP/MySql)

Discussion in 'Programming & Webmastering' started by smartali89, Jun 18, 2011.

  1. smartali89

    smartali89 New Member

    Joined:
    Dec 1, 2007
    Messages:
    525 (0.20/day)
    Thanks Received:
    13
    Location:
    Karachi, Pakistan
    Hello,

    I am using PHP/MySql, I am updating a table having about 2000 records, I am updating using the index key and just update one column.. its taking about 0.03-0.09 secs, I feel like its slow.. as I have other similar update queries on the page so it could a big time..

    the Select query on the other hand takes only 0.0006-0.001 secs
     
  2. W1zzard

    W1zzard Administrator Staff Member

    Joined:
    May 14, 2004
    Messages:
    15,265 (3.85/day)
    Thanks Received:
    12,375
    show your statement
     
  3. smartali89

    smartali89 New Member

    Joined:
    Dec 1, 2007
    Messages:
    525 (0.20/day)
    Thanks Received:
    13
    Location:
    Karachi, Pakistan
    Update tbllikes set views=2000 where id=1700
     
  4. W1zzard

    W1zzard Administrator Staff Member

    Joined:
    May 14, 2004
    Messages:
    15,265 (3.85/day)
    Thanks Received:
    12,375
    if you have a key on id then there is nothing else you can optimize from a query perspective.

    could you look into your mysql server variables like buffers etc
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page