SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: Testing speed of mysql query
-
Mar 4, 2004, 02:40 #1
- Join Date
- Aug 2000
- Location
- Singapore
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Testing speed of mysql query
I have been seeing people posting about the speed of various mysql queries that they have and I'm curious how do I find the speed? Could someone show me an example?
First Million Challenge - Blog Challenge To Make My First Million
Active-Income.com | Active Jokes | Active-Freebies.com | Active Free Stuff
-
Mar 4, 2004, 02:49 #2
- Join Date
- Feb 2002
- Location
- Geneva, Switzerland
- Posts
- 74
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by FreebieGuy
-
Mar 4, 2004, 07:07 #3
- Join Date
- Aug 2000
- Location
- Singapore
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for pointing me to it.
First Million Challenge - Blog Challenge To Make My First Million
Active-Income.com | Active Jokes | Active-Freebies.com | Active Free Stuff
-
Mar 4, 2004, 07:19 #4
- Join Date
- Aug 2000
- Location
- Singapore
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Just wondering if the time returned for that article is returned in seconds.
First Million Challenge - Blog Challenge To Make My First Million
Active-Income.com | Active Jokes | Active-Freebies.com | Active Free Stuff
-
Mar 4, 2004, 07:21 #5
- Join Date
- Feb 2001
- Location
- Melbourne Australia
- Posts
- 6,282
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
If you have phpmyadmin, it's a reasonably good way to test a query. It tells you how long the query took, and it lets you turn a "select" into an "explain" and back so you can see what the query's doing. The only problem is that it always adds a "limit" clause which can affect the query's speed of operation.
[mmj] My magic jigsaw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Bit Depth Blog · Twitter · Contact me
Neon Javascript Framework · Jokes · Android stuff
-
Mar 4, 2004, 07:47 #6
- Join Date
- Aug 2000
- Location
- Singapore
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
"It tells you how long the query took"
Erm... which version of phpMyAdmin are you using? My webhost does not seem to state the execution time.First Million Challenge - Blog Challenge To Make My First Million
Active-Income.com | Active Jokes | Active-Freebies.com | Active Free Stuff
-
Mar 4, 2004, 08:39 #7
- Join Date
- Feb 2001
- Location
- Melbourne Australia
- Posts
- 6,282
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
I'm running 2.5.5, but I'm pretty sure it's been a feature of phpmyadmin for a long time. When you do an SQL query.
[mmj] My magic jigsaw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Bit Depth Blog · Twitter · Contact me
Neon Javascript Framework · Jokes · Android stuff
-
Mar 4, 2004, 18:46 #8
- Join Date
- Aug 2000
- Location
- Silicon Valley
- Posts
- 2,241
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You could download the latest phpMyAdmin and install it yourself, it should work even on shared hosting environment.
http://www.phpmyadmin.net/
As for the speed of query, it's very fast for most of the cases. To know the details on why it's slow, try use EXPLAIN query
http://www.mysql.com/doc/en/EXPLAIN.html
To have MySQL log slow queries, you could modify my.cnf
log-slow-queries=/var/log/mysqld.slow.log
long_query_time=5 (5 secs)- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy
Bookmarks