php + h2
什么是h2?baidu讲的比我详细。。。。为什么选择h2?如果是javaer,1,***,2,***,3,***
为什么Php还要h2?
因为sqlite,*** vs h2 玩不赢撒, 在开源的嵌入式数据库里,头数h2吧
Php + H2 ~= Php + PostgreSQL
我在公司做了一个test,转帖到下面
CUP:AMD Athlon(XP) 2500+ 1.47G
RAM:1G
Version:php(5.2.9-2) h2(1.073)
Step 1 download JRE1.6 +
Step 2 download h2
Step 3 extension available for php-PostgreSQL
Step 4 Run h2 with pg-catalog(java -cp h2.jar org.h2.tools.Server)
Step 5 create table x_user with one column varchar type named 'name'
Step 6 Change DNS in pg_test.php
Run and Enjoy!
D:\Program Files\workspace\php>php pg_test.php
Begin time : 1239342571
End Insert time : 1239342572
During Insert time : 1
End Select time : 1239342572
During Select time : 0
Insert 1000 records(one column)
Select 1000
D:\Program Files\workspace\php>php pg_test.php
Begin time : 1239342814
End Update time : 1239342815
During Update time : 1
End Select time : 1239342816
During Select time : 1
Update 1000 records(one column)
Select 2000
用libpg 或者odbc(需要安装PostgreSQL的ODBC Driver),都可以
附一个pg的php文件,
感兴趣的看下子哦
页:
[1]