Professional Web Applications Themes

Load testing question - MySQL

I have recently inherited management of a bloated, bersome PHP/MySQL application and I am trying to get some basic information on exactly how much the PHP is abusing the database and in what places the schema could be altered to reduce some of the load. I would like to find out things like how many queries are being executed per page load, number of joined tables on some specific queries, etc. but I can't really just modify the PHP in any logical way to report some of this (read: bloated). Is there a way (forgive my inexperience with MySQL) to ...

  1. #1

    Default Load testing question

    I have recently inherited management of a bloated, bersome PHP/MySQL
    application and I am trying to get some basic information on exactly
    how much the PHP is abusing the database and in what places the schema
    could be altered to reduce some of the load. I would like to find out
    things like how many queries are being executed per page load, number
    of joined tables on some specific queries, etc. but I can't really just
    modify the PHP in any logical way to report some of this (read:
    bloated).

    Is there a way (forgive my inexperience with MySQL) to do this in the
    database side of things? I can run the app locally so I all I really
    need is some stats from the db. Any ideas would be awesome, thanks
    ahead of time!

    One.

    onembk Guest

  2. #2

    Default Re: Load testing question

    > I have recently inherited management of a bloated, bersome PHP/MySQL 

    There are two things of use, I guess: the query log and the slow query
    log. You can switch on the query log and see what SQL is generated. If
    there are slow queries (by lack of indexes, usually) they might end up
    in the slow query log. See the command-line options for mysqld in the
    manual.

    In the normal log, you don't see a page request, but you see a
    connection number. If it is an "open-and-forget" type of application,
    these are the same.

    Oh, and if you want to know why a query is slow (if you know it is slow,
    because it is in the slow query log), use the EXPLAIN statement.

    Good luck.
    Dikkie Guest

  3. #3

    Default Re: Load testing question

    On 2007-06-10 10:36:50 -0600, Dikkie Dik <org> said:
     
    >
    > There are two things of use, I guess: the query log and the slow query
    > log. You can switch on the query log and see what SQL is generated. If
    > there are slow queries (by lack of indexes, usually) they might end up
    > in the slow query log. See the command-line options for mysqld in the
    > manual.
    >
    > In the normal log, you don't see a page request, but you see a
    > connection number. If it is an "open-and-forget" type of application,
    > these are the same.
    >
    > Oh, and if you want to know why a query is slow (if you know it is
    > slow, because it is in the slow query log), use the EXPLAIN statement.
    >
    > Good luck.[/ref]

    Ok, thank you. Part of the issue is that the queries are generated
    dynamically by the code and are executed by different objects. I'll
    take a look at the logging options, hopefully that will point me in the
    right direction.

    Thanks again.

    One

    onembk Guest

Similar Threads

  1. Load Testing
    By tame_it in forum Coldfusion Server Administration
    Replies: 2
    Last Post: May 22nd, 11:59 PM
  2. Load testing tool for FMS based application
    By dineshawasthi in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: October 23rd, 10:23 AM
  3. Load Testing File Uploads
    By Scott in forum ASP Database
    Replies: 1
    Last Post: June 20th, 04:18 AM
  4. OT: Testing our website, putting load.
    By Sims in forum PHP Development
    Replies: 2
    Last Post: February 25th, 05:31 AM
  5. Load testing tool for Informix
    By KalpanaPai in forum Informix
    Replies: 7
    Last Post: September 22nd, 01:23 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139