Bug #66875 [Csd]: Increasing performance of LOB fetching
| From: | sixd@php.net | Date: | Mon, 10 Mar 2014 23:58:27 +0000 |
| Subject: | Bug #66875 [Csd]: Increasing performance of LOB fetching | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184701@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66875&edit=1
ID: 66875
Updated by: sixd@php.net
Reported by: perrier dot p at gmail dot com
-Summary: Increasing performance in lob fecthing by x2
+Summary: Increasing performance of LOB fetching
Status: Closed
Type: Bug
Package: OCI8 related
Operating System: irrelevant
PHP Version: Irrelevant
-Assigned To:
+Assigned To: sixd
Block user comment: N
Private report: N
New Comment:
The performance benefit will be system dependent. I had to fetch 4K
rows before I could begin to measure any time improvement from caching
OCILobGetChunkSize()'s value. Since OCILobCharSetId doesn't involve a
network trip, caching its value seems to add more obscurity then it's
worth.
A patch was merged to PHP 5.6+. See http://news.php.net/php.cvs/76429
and
https://github.com/php/php-src/commit/de4ff2c5a42980645baf731200840c56d6a75275
Can you check it before I release OCI8 2.0.8 on PECL?
Patch description: The patch caches the result of OCILobGetChunkSize()
to avoid a DB round trip for the second and subsequent rows fetched
when using PHP's OCI_RETURN_LOBS. This will help overall scalability.
Implementing similar caching for LOB locator fetches using
OCI-Lob::read() and OCI-Lob::load() might be possible, but would
require a more complex patch.
Previous Comments:
------------------------------------------------------------------------
[2014-03-10 23:47:33] sixd@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src.git;a=commit;h=601367ee75c570b52ac8f28c7b26d5166cad2989
Log: Fixed Bug #66875 (Improve performance of multi-row OCI_RETURN_LOB queries)
------------------------------------------------------------------------
[2014-03-10 09:37:19] perrier dot p at gmail dot com
Description:
------------
chunk_size from a lob is loaded for each column and each line, but can be defined only for each
column in ORACLE, so we can make a cache of chunk_size in column object instead of fetching it on
every lob.
With this change you can increase by a factor x2 the lob fecthing part of a query.
Patch is made from PHP 5.5.5 source code.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66875&edit=1