Subject Re: [IBDI] SPEED-- Product Comparisons
Author Paul Reeves
"Victor M. Varela" wrote:
>
>
> Of course, Ann, this is my test code for insert (same is for all dbms):
>
> <?php
>
> if (! $db) exit;
>
> $dbconfig["sqlserver"] = "localhost";
> $dbconfig["defaultdb"] = ($db == "ibase") ? "/tmp/pru.gdb" : "prueba";
> $dbconfig["sqlusername"] = "nobody";
> $dbconfig["sqlpassword"] = "nobody";
>
> require("$db.db.inc");
>
> $max = ($db == "pgsql-new") ? 1000 : 10000;
>
> for ($i = 1; $i < $max; $i++)
> {
> $rs = dbquery("insert into nombres(id,name) values ($i,'record number
> $i')");
> }
> echo "end.";
>
> ?>
>

From the look of this code you are not wrapping all the insertions in a single
transaction. Neither are you using a prepared, parameterised query. Those two
changes alone would vastly improve the InterBase performance.

I know you are trying to compare like with like, but one of the reasons that
mySQL performs so well is because it doesn't really have transactions. For all I
know it may not have prepared, parameterized queries, either. It assumes that
only one user is inserting data and that user knows what he is doing. InterBase
starts from different assumptions.

See if you can run some tests with the above changes and let us know.

Paul
--

Paul Reeves
Fleet River Software