I am writing this post here to share my findings on the maximum query execution speed of MySQL5 with php5 on two different systems. Both the tests were conducted on the local server.
The system configurations of the test PCs were as:
1) Avinash OS : Windows XP SP2
Intel P4, 3.066 GHz, 1.25 GB RAM
2) Ajay OS : Windows Vista SP2
AMD 64x2, 1.9 GHz, 3.00 GB RAM
Following were the configurations of WAMP server
Apache 2.2.11
PHP 5.2.8
MySQL 5.1.30
Below are the figures of my memory usage on the two computers before the test
Fig1. Avinash Memory Usage
Fig 2. Ajay Memory Usage
I have written the MySQL queries with PHP and obtained the completion time to perform the set of queries in Firefox 3.5.1. I chose Mozilla because currently its the most popular browser used by people today and no other reasons. Also, I have used MYSQLI extension which is a bit slower (negligible to a large extent) than MYSQL extension. But, it is recommended with PHP 4.1 or higher( source php.net)
The queries per second data were obtained from MySQL Administrator. You may also download one for yourself for free.
These tests may not be the actual case scenario with the webhosting servers, but still if this piece of information is helpful to you in any way, I will be glad :D. The reason that I conducted these tests was that I wanted to have the actual performance of MySQL with PHP and not just using any MySQL tool to query the database server directly.
Test
The sheet has been prepared for 5000 queries and 2000 queries. The php script looped through the queries to obtain the desired operation. The script execution time displayed in the browser is the summation of all the query time and other script execution time.
The data in the sheet is in the following format:
The Result Sheet
The system configurations of the test PCs were as:
1) Avinash OS : Windows XP SP2
Intel P4, 3.066 GHz, 1.25 GB RAM
2) Ajay OS : Windows Vista SP2
AMD 64x2, 1.9 GHz, 3.00 GB RAM
Following were the configurations of WAMP server
Apache 2.2.11
PHP 5.2.8
MySQL 5.1.30
Below are the figures of my memory usage on the two computers before the test
Fig1. Avinash Memory Usage
Fig 2. Ajay Memory Usage
I have written the MySQL queries with PHP and obtained the completion time to perform the set of queries in Firefox 3.5.1. I chose Mozilla because currently its the most popular browser used by people today and no other reasons. Also, I have used MYSQLI extension which is a bit slower (negligible to a large extent) than MYSQL extension. But, it is recommended with PHP 4.1 or higher( source php.net)
The queries per second data were obtained from MySQL Administrator. You may also download one for yourself for free.
These tests may not be the actual case scenario with the webhosting servers, but still if this piece of information is helpful to you in any way, I will be glad :D. The reason that I conducted these tests was that I wanted to have the actual performance of MySQL with PHP and not just using any MySQL tool to query the database server directly.
Test
The sheet has been prepared for 5000 queries and 2000 queries. The php script looped through the queries to obtain the desired operation. The script execution time displayed in the browser is the summation of all the query time and other script execution time.
total time = database query time + other script execution time
The data in the sheet is in the following format:
max queries per sec / min queries per sec / avg queries per sec / time in seconds
The Result Sheet
Fig 3. The result Sheet
(time in seconds)
These results are for reference only. The actual results will vary from system to system and the network parameters.