mysql|oracle| Comparison | data | database | Performance comparison of PHP with MySQL and Oracle database
Test hardware Instructions:
The test used is my love machine, configured as follows:
cpu:c433
Memory: 128M
Hard drive: Cool fish 2 generation 20G
Test Software Description:
WIN32 is under Windows NT Server4,sp5,apache 1.3.12,php3.0.15 and Php4rc1,mysql 3.22.29,oracle 8.0.5
Linux is Bluepoint linux1.0, Apache 1.3.12, Php4rc1,mysql 3.22.32
Test Code Description:
Using a very simple table, MySQL and Oracle use the same table structure, there are only three fields, the structure is as follows:
MySQL table structure:
CREATE TABLE Board (
board_id smallint (6) not NULL auto_increment,
Board_name char (not NULL),
Board_manager Char (20),
PRIMARY KEY (board_id)
);
Structure of Oracle:
CREATE TABLE php_oracle. " BOARD "
("board_id" FLOAT,
' Board_name ' CHAR (not NULL),
"Board_manager" CHAR (20));
We only tested the time it took for the insert operation and did not test for select.
Because only PHP3 can connect to Oracle databases under Win32, the performance of connecting Oracle with PHP3 is only tested. It is believed that when the official version of PHP4 comes out, the speed of connecting Oracle with PHP4 should be improved.
But under Linux, because I did not install Oracle, I only tested MySQL performance. Oracle is said to perform well under Linux, but it is impossible to test.
And we put all the code for the database connection and Oracle parsing SQL statements out of the statistical code, so the test time is just the time it takes to execute the SQL operation.
Conclusion:
Under WIN32, MySQL's performance is not very good, but it's a lot quicker than oracle8, especially when I'm in a test program and don't include a database connection, so this test result is just the time it takes to insert the data, and Oracle's connection, days, too slow! On my machine, connect once, at least 1-2 seconds.
And in Linux, MySQL performance compared to the WIN32, and has a big leap. Reduced from 28 seconds to 10 seconds.
So, if you don't need the support of stored procedures, and the database is not large enough to be so amazing, or use MySQL under Linux as your database! This lightweight database gives you the best performance, manageability, and pretty good security.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.