prepare('MERGE INTO performance_cache(ckey,cvalue) VALUES(?,?)'); $stmt->execute(array($key, $value)); } define('N', 10000); function test($con) { // put speed $t1 = gettimeofday(TRUE); for($i = 0; $i < N; $i++) { put($con, 'K#' . ($i + 1), $i + 1); } $t2 = gettimeofday(TRUE); echo sprintf("%d puts per second\r\n", (int)(N / ($t2 - $t1))); } define('REP', 5); $con = new PDO('odbc:ARNEPC4_IGNITE'); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $con->query('CREATE TABLE IF NOT EXISTS performance_cache (ckey VARCHAR(16) NOT NULL, cvalue INTEGER NOT NULL, PRIMARY KEY(ckey))'); for($i = 0; $i < REP; $i++) { test($con); } ?>