Problem with Informix and PHP
| From: | Danny Heijl | Date: | Fri, 19 Nov 1999 18:37:01 +0000 |
| Subject: | Problem with Informix and PHP | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12784@lists.php.net to get a copy of this message | ||
For select statements, ifx_affected_rows() depends on information supplied by the Informix optimizer
after preparing the query.
There are two caveats :
1. the optimizer can only give an estimate of the number, because the query result set has not yet
been built, only the query plan has been decided based on statistical information and indexes. So
the number will NEVER be exact, this is stated clearly in the PHP manual and in the Informix ESQL/C
manual (description of the sqlca structure). It is only an estimate.
2. the statistical information used by the optimizer relies on the presence of this statistical
information. If you never run "update statictics" on your databases, you will have poor
performance because the optimizer has no accurate information to prepare the query plan, and the
number returned by ifx_affected_rows() will be meaningless.
The number of rows returned by "ifx_affected_rows()" is only accurate for
insert/update/delete type queries, never for select type queries.
Danny
---