--- /usr/local/src/zabbix-1.1.2/frontends/php/include/db.inc.php Tue Sep 12 15:09:36 2006
+++ /usr/local/www/data/mon/include/db.inc.php Wed Sep 13 15:24:00 2006
@@ -237,7 +237,7 @@
if($DB_TYPE == "POSTGRESQL")
{
- $oid=pg_getlastoid($result);
+ $oid=pg_last_oid($result);
// echo "OID:$oid<br>";
$sql="select $field from $table where oid=$oid";
$result=DBselect($sql);
------------------
for pg_last_oid() to work you need to make one thing:
in each table definition in create/postgresql/schema.sql replace blocks `);` with `) WITH OIDS;`.
------------------
One more thing: they say, that PGSQL storage is almost 10 times slower than MYSQL. To brake that myth remove all indexes from pg-schema (#sed -E "s/^CREATE INDEX.*$//g" schema.sql) and only then try to compare (BTW, they say, that complex queries are done faster on PGSQL engine than on MYSQL one, and tracing queries of web-intreface I figured out that there's enough of such queries to try to compare).
+++ /usr/local/www/data/mon/include/db.inc.php Wed Sep 13 15:24:00 2006
@@ -237,7 +237,7 @@
if($DB_TYPE == "POSTGRESQL")
{
- $oid=pg_getlastoid($result);
+ $oid=pg_last_oid($result);
// echo "OID:$oid<br>";
$sql="select $field from $table where oid=$oid";
$result=DBselect($sql);
------------------
for pg_last_oid() to work you need to make one thing:
in each table definition in create/postgresql/schema.sql replace blocks `);` with `) WITH OIDS;`.
------------------
One more thing: they say, that PGSQL storage is almost 10 times slower than MYSQL. To brake that myth remove all indexes from pg-schema (#sed -E "s/^CREATE INDEX.*$//g" schema.sql) and only then try to compare (BTW, they say, that complex queries are done faster on PGSQL engine than on MYSQL one, and tracing queries of web-intreface I figured out that there's enough of such queries to try to compare).
Comment