#30194 [Bgs->Opn]: Mysqli Prepared Statements work very slow when CLOB\BLOB is in result set
| From: | phoeniks2k at mail dot ru | Date: | Wed, 29 Sep 2004 09:44:18 +0000 |
| Subject: | #30194 [Bgs->Opn]: Mysqli Prepared Statements work very slow when CLOB\BLOB is in result set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66860@lists.php.net to get a copy of this message | ||
ID: 30194
User updated by: phoeniks2k at mail dot ru
Reported By: phoeniks2k at mail dot ru
-Status: Bogus
+Status: Open
Bug Type: MySQLi related
Operating System: All
PHP Version: 5.0.1
New Comment:
No, i ment another thing.
Every query\stmt is executed multiple times (stmts are prepared only
once)
This statement
SELECT id, title, proto, lnk4, mdf FROM objects_hier oh WHERE owner =
?
works FASTER then query
SELECT id, title, proto, lnk4, mdf FROM objects_hier
WHERE owner = $owner_id
But this statement (i marked clob field)
SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM
objects_hier oh WHERE owner = ?
works MUCH SLOWER then query
SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM
objects_hier
WHERE owner = $owner_id
Every time ALL DATA is fetched from recordsets to script variables,
everything is made as it was described in DOC and is identical by
result except exec time
Previous Comments:
------------------------------------------------------------------------
[2004-09-29 11:16:07] georg@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Retrieving only a single recordset with a prepared
statement is of course slower. Why do you use
mysqli_stmt_store_result? The first recordset is already
sent to client after mysqli_stmt_execute.
Also there is no reproducible testcase in your bug report.
------------------------------------------------------------------------
[2004-09-22 14:38:07] phoeniks2k at mail dot ru
Sorry, some additional info:
Mysql 4.1.4 Gamma and clobs are not empty
------------------------------------------------------------------------
[2004-09-22 14:27:20] phoeniks2k at mail dot ru
Description:
------------
If result set has clob\blob fields, retrieving data is VERY slow.
Query "SELECT SQL_NO_CACHE id, xml_clob FROM some_table WHERE id = 1"
executes 1000 times for about 0.4 seconds on my server;
But this query rewriten with statement execs 20 time for 6(!)
seconds!!!
Every time i call:
exec, store result, fetch, free_result
P.S. SQL_NO_CACHE is used for clean noncached result times
Expected result:
----------------
STMT performance higher then normal query performance
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30194&edit=1