Why is ibase_fetch_object() so slow?
| From: | Todd Cary | Date: | Tue, 23 Apr 2002 18:29:35 +0000 |
| Subject: | Why is ibase_fetch_object() so slow? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94226@lists.php.net to get a copy of this message | ||
The time for getting the result set from a 850,000 row table is about 1.5
seconds. The execution of the ibase_fetch_object() takes about 18 seconds. Is
there any way to speed this up?
Todd
$start_time = getmicrotime();
$dbh = db_open($host, $user, $password);
if ($dbh) {
if ($use_exact == "Yes") {
$sthdl = db_find_exact_match(0, $find_firstname, $find_lastname,
$find_state);
} else {
$sthdl = db_find_like_match(0, $find_firstname, $find_lastname,
$find_state);
}
// Appx 1.5 seconds at this point
$end_time = getmicrotime();
$delta = $end_time - $start_time;
$delta = number_format($delta, 2, '.', ',');
if ($sthdl) {
$end_time = getmicrotime();
$delta2 = $end_time - $start_time;
$delta2 = number_format($delta2, 2, '.', ',');
print("Delta 2: " . $delta2 . "<br>");
$row = ibase_fetch_object($sthdl);
// Appx 18 seconds at this point
$end_time = getmicrotime();
$delta3 = $end_time - $start_time;
$delta3 = number_format($delta3, 2, '.', ',');
print("Delta 3: " . $delta3 . "<br>");
if ($row) {
grid_init($delta);
--
Todd Cary
Ariste Software
2200 D Street Extension
Petaluma, CA 94952
707-773-4523
todd@aristesoftware.com