Compare performance with PHP even MySQL and Oracle database performance

xiaoxiao2021-03-06  122

Compare performance with PHP even MySQL and Oracle database performance

Use PHP even MySQL and Oracle database performance comparison test hardware instructions: Testing is my love machine, configured as follows: CPU: C433 memory: 128M hard disk: Cool fish 2 generation 20G test Software Description: Win32 is used in Windows NT Server4 , sp5, apache 1.3.12, php3.0.15 and php4rc1, mysql 3.22.29, Oracle 8.0.5 Linux Used BluePoint Linux1.0, Apache 1.3.12, PHP4RC1, MYSQL 3.22.32 Test Code Description: Use one Very simple table, MySQL and Oracle are the same, only three fields, the structure is as follows: Mysql table structure: create table board (6) Not null auto_increment, Board_name char (16) Not null , Board_manager char (20), Primary Key (Board_ID)); Oracle's Structure: CREATE TABLE PHP_Oracle. "Board" ("Board_ID" Float, "Board_name" char (16) Not Null, "Board_Manager" char (20)); We only tested the time of INSERT operation, for SELECT, did not test. Because only PHP3 in Win32 can connect to the Oracle database, only the performance of connecting Oracle is connected with PHP3 is tested. After the official version of PHP4, the speed of connecting Oracle with php4 should be improved. And under Linux, because I didn't load Oracle, I only tested mySQL performance. It is said that in Linux, Oracle's performance is good, just unattainable. And we put all the code used for database connections and Oracle to analyze SQL statements, so the test depends only for time spent on SQL operations.

Programs used to test mysql: "; echo "begin time:". $ begin_time. "
"; echo "
end time:" $ end_time. "
"; $ TOTAL = $ END_TIME- $ begin_time; echo "Total Sources:". $ Total;?> Used to test Oracle: "; "Begin Time: "$ begin_time."
"; Echo"
end time: "$ end_time."
"; $ total = $ END_TIME- $ begin_time; echo" Total Sources: ". $ Total;> Test results: Environment: Win32 Apache php4 mysql Results: 28 seconds Environment: Win32 Apache php3 mysql Results: 34 seconds Environment: Win32 Apache PHP3 Oracle8.0.5 (OCI function) Result: 46 seconds: Linux Apache PHP4

转载请注明原文地址:https://www.9cbs.com/read-126635.html

New Post(0)