Bug #66875 [Csd]: Increasing performance of LOB fetching
| From: | perrier dot p at gmail dot com | Date: | Tue, 11 Mar 2014 08:25:49 +0000 |
| Subject: | Bug #66875 [Csd]: Increasing performance of LOB fetching | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184711@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
User updated by: perrier dot p at gmail dot com
Reported by: perrier dot p at gmail dot com
Summary: Increasing performance of LOB fetching
Status: Closed
Type: Bug
Package: OCI8 related
Operating System: irrelevant
PHP Version: Irrelevant
Assigned To: sixd
Block user comment: N
Private report: N
New Comment:
Great job, 2.0.8 with lob patch go 13% faster than 5.5.5 with lob patch for me.
respectively for vanilla, my patch, your patch and oci 2.0.8 my test page take
2.6s , 1.66s, 1.45s
Fetching time with many lob column go down from 1569ms to 556ms
Tahnks.
Previous Comments:
------------------------------------------------------------------------
[2014-03-10 23:58:26] sixd@php.net
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.
------------------------------------------------------------------------
[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