Use PHP even mysql and oracle database performance comparison including connection mode

xiaoxiao2021-03-06  55

Compare performance with PHP even MySQL and Oracle database performance

Test Hardware Description: Testing is my love machine, configured as follows: CPU: C433 Memory: 128M hard drive: 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 is used in BluePoint Linux1.0, Apache 1.3.12, PHP4RC1, MYSQL 3.22.32 Test Code Description: Use a very simple table, the table structure used by mysql and oracle, 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_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-118205.html

New Post(0)