CPU Load

Discussion in 'PHP' started by sheetal.icl, Jun 13, 2008.

  1. #1
    i am using a connection.php file in which i am creating db connection using pear package. In all files i am calling connection.php file to connect through db. and in each query i am using db->prepare ans db->execute functions.

    Script is running fine with NO errors.

    my problem is that, this script is putting heavy load on the server because of which i am spending a lot on hosting.

    Can anyone help me to find that why my script is putting heavy load on the server.

    can I reduce server load?
     
    sheetal.icl, Jun 13, 2008 IP
  2. clobberx

    clobberx Active Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #2
    try to optimise your query and do the table indexing, sure it works
     
    clobberx, Jun 13, 2008 IP
  3. MayurGondaliya

    MayurGondaliya Well-Known Member

    Messages:
    1,233
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    170
    #3
    What is your database size? Are mysql server and your website are in the same box? You can pm me some more details, may be I can help you with that.
     
    MayurGondaliya, Jun 13, 2008 IP
  4. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #4
    Lots of times it's indeed a bad database structure that makes the load high.. show us your tables and or queries :)
     
    EricBruggema, Jun 14, 2008 IP
  5. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #5
    1. What is the traffic like? 100 visitors, 1000 visitors,?

    2. What does the connection function say? connect or pconnect?

    3. Is the application custom made or a product?
     
    Lordo, Jun 14, 2008 IP