#46471 [Opn->Fbk]: Performance problem when reading XML columns

From: Date: Tue, 20 Oct 2009 10:19:51 +0000
Subject: #46471 [Opn->Fbk]: Performance problem when reading XML columns
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-143723@lists.php.net to get a copy of this message
ID: 46471 Updated by: jani@php.net Reported By: rgpublic at gmx dot net -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Linux -PHP Version: 5.2.6 +PHP Version: 5.2 (SVN-2009-10-19) New Comment: Exactly what results do you get? And why do you really think it should be any faster, considering you're doing a lot more function calls with the "simple" approach? Previous Comments: ------------------------------------------------------------------------ [2009-10-19 21:12:49] rgpublic at gmx dot net Still happens with recent snapshot. ------------------------------------------------------------------------ [2009-10-19 15:00:08] jani@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2008-11-03 14:24:12] rgpublic at gmx dot net Example source code: http://oberon.q-one-hosting.com/ocidemo.txt This script does the following: Create a table with an XML column and fills it with data. Now, the simple approach to read back the data would be: SELECT mytab.xml.getClobVal() AS xml FROM xmltest mytab; This approach takes about twice the time as the second example which does the reading inside a PL/SQL function and concatenates the result separated by a chr(0)-character i.e. transferring the whole data in a single string. I'm wondering why there is such a loss of performance. ------------------------------------------------------------------------ [2008-11-03 14:20:36] rgpublic at gmx dot net Description: ------------ Reading an XML column seems to be unnecessarily slow. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46471&edit=1

« previous php.bugs (#143723) next »