Performance Comparison of MySQL and Oracle databases connected with PHP

Source: Internet
Author: User
Test hardware description: test uses my machine, the configuration is as follows: CPU: C433 memory: M hard disk: Cool 2 generation 20g test software description: WIN32 uses windowsntserver4, sp5, apache1.3... test hardware description:

The test uses my machine. the configuration is as follows:

CPU: C433

Memory: 128 MB

Hard disk: Cool 2 generation 20G

Test Software description:Windows nt server4, sp5, apache 1.3.12, php3.0.15, php4rc1, mysql 3.22.29, and oracle 8.0.5 are used in WIN32.

In linux, bluepoint linux1.0, apache 1.3.12, php4rc1, and mysql 3.22.32 are used.

Test Code description:A simple table is used. mysql and oracle use the same table structure and have 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(16) NOT NULL, board_manager char(20), PRIMARY KEY (board_id) );

Oracle structure:

CREATE TABLE PHP_ORACLE."BOARD" ("BOARD_ID" FLOAT, "BOARD_NAME" CHAR(16) NOT NULL, "BOARD_MANAGER" CHAR(20)) ;

We only tested the INSERT operation time. for select, no tests were conducted. In win32, only PHP3 can connect to the oracle Database. Therefore, only the performance of connecting oracle with PHP3 is tested. I believe that after the official version of PHP4 is released, the speed of connecting oracle with PHP4 should be improved.

In LINUX, I only tested the performance of mysql because I didn't install oracle. It is said that in LINUX, oracle has good performance but cannot be tested.

In addition, we put all the code used for database connection and oracle to analyze SQL statements out of the statistical code. Therefore, the test only takes time to execute SQL operations.

Programs used to test mysql:

 ";echo "begin time:" . $begin_time . "
";echo "
end time:" . $end_time . "
";?>



Permanent address:

Reprint at will ~ Please bring the tutorial URL ^

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.