Single index example 1
From Ye Ole Stash
General Info
- Apache Bench Command Used: ab -c 10 -n 100 http://$SITE/index.php
- Select Statement that gave away the need for a index: Query SELECT * FROM session_data WHERE phpsessionid = 'mphq67igrjphsorbdi8gp1sjl6' AND expire > '1283378180'
- I want to add that using a SELECT * has never been my best pratice but the webdev for this managed customer decided it was his and with the pages Zend encoded and not "supposted" to be having access to the source I did what I could with what I had which was DB site.
Before adding a index
ab -c 10 -n 100 http://<removed>/index.php This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking (be patient).....done Server Software: Apache/2.2.0 Server Hostname: <removed> Server Port: 80 Document Path: /index.php Document Length: 103866 bytes Concurrency Level: 10 Time taken for tests: 46.619197 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 10454000 bytes HTML transferred: 10386600 bytes Requests per second: 2.15 [#/sec] (mean) Time per request: 4661.920 [ms] (mean) Time per request: 466.192 [ms] (mean, across all concurrent requests) Transfer rate: 218.97 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 1 1.9 1 14 Processing: 2161 4567 790.9 4691 6136 Waiting: 2149 4553 788.8 4679 6102 Total: 2163 4568 791.2 4693 6137 Percentage of the requests served within a certain time (ms) 50% 4693 66% 4932 75% 5012 80% 5066 90% 5194 95% 5928 98% 6039 99% 6137 100% 6137 (longest request)
After adding a index
ab -c 10 -n 100 http://<removed>/index.php This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking (be patient).....done Server Software: Apache/2.2.0 Server Hostname: <removed> Server Port: 80 Document Path: /index.php Document Length: 103866 bytes Concurrency Level: 10 Time taken for tests: 3.515074 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 10454000 bytes HTML transferred: 10386600 bytes Requests per second: 28.45 [#/sec] (mean) Time per request: 351.507 [ms] (mean) Time per request: 35.151 [ms] (mean, across all concurrent requests) Transfer rate: 2904.06 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 1 1.6 1 7 Processing: 249 335 49.4 326 518 Waiting: 237 321 48.9 310 502 Total: 250 337 49.1 328 518 Percentage of the requests served within a certain time (ms) 50% 328 66% 349 75% 358 80% 366 90% 385 95% 442 98% 510 99% 518 100% 518 (longest request)