Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2002

    Php Mysql Speed???


    I have a client who have some php scripts. But, he tell the time between php and mysql is too long, between 2.5 sec and 78!!!! On a local computer the time is ... 0.3 sec

    How can I verify the speed and how can I modify the speed?

    Thank you very much!

  2. #2
    I'm not a PHP/MySQL expert but what I can tell you is it really depends on what his search string is and how he searches for it in the table. And to increase speed you can try allocating more memory to MySQL, sorry but I dont remember what file you do it in.

  3. #3
    Join Date
    Jul 2001
    Wrapped in CAT5.

    Lightbulb Performance....

    This is kind of confusing...

    1.) What (specifically) is executing when it's taking a long time? (Select, insert, update, etc)

    2.) Is there a discrepancy between the number of rows on your test database (locally) and the number of rows in the database that is causing problems?

    3.) Have you done a ps -ef --sort %cpu to see what is taking the most CPU time on the slow box?

    4.) What does 'uptime' say that the CPU stats are on the slow box?

    5.) If it's a select that is slow, have you tried putting an index on the columns used in the where clause (or on foreign keys)?

    Dan Esparza
    CagedTornado web services

  4. #4
    Join Date
    Apr 2001
    Montana USA
    John Masterson
    Former Hosting Company Owner

  5. #5
    Join Date
    Nov 2001
    In addition to the above, is the user selecting from the same quantity of data on his local test machine? If he has a development envioronment with only a few records locally, but man tens of thousands of records on the host machine, it could mean:

    - a completely unfair comparison.
    - that lack of indexes on columns being queried do not show up as issues on the dev environment but do in production simply because there is more data there for MySQL to churn against

    Bottom line, there are many more questions that need asking and it seems as if both you and your user may not have the background to look for the right questions first in order to get answers.

    Your server may or may not have issues, but you wont be able to bring this to a conclusion without getting a lot more detail.

    PS, answer my poll:
    Bearded Geeks or Not?
    “Even those who arrange and design shrubberies are under
    considerable economic stress at this period in history.”

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts