SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru phantom007's Avatar
    Join Date
    May 2008
    Posts
    741
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Question Website Slow due to database

    Hi

    If I have a database driven website with hundreds of pages, and someday if my users starts complaining that the website is very slow, how do I know the bottleneck?

    Is there anyway in mysql to know what query is causing slowness?


    Thanks

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,032
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    There is the slow query log: http://dev.mysql.com/doc/refman/5.5/...query-log.html

    but afaik that doesn't work with prepared statements. Does each script open it's own database connection or are you passing a single database connection around all the scripts that need it?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator


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
  •