Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Determine size of big files in XDB

Lars73Aug 28 2006 — edited Aug 30 2006
Hello,

my target is to determine the size of a file in the xdb (10.2.0.1).

The file was uploaded with ftp to the xdb. In the sample Content Management Systen (http://www.oracle.com/technology/sample_code/tech/xml/xmldb/cmsxdb/index.html) I have found the following statement:

SELECT TO_CHAR(extractvalue(res, '/Resource/Owner/text()'))
,SUBSTR(TO_CHAR(extractvalue(res, '/Resource/CreationDate/text()'), 'DD-MON-YYYY'), 1, 12)
,SUBSTR(TO_CHAR(extractvalue(res, '/Resource/ModificationDate/text()'), 'DD-MON-YYYY'), 1, 12)
,TO_CHAR(extractvalue(res, '/Resource/Language/text()'))
,TO_CHAR(extractvalue(res, '/Resource/ContentType/text()'))
,TO_CHAR(NVL(extractvalue(res, '/Resource@VersionID'), '-1') )
,TO_CHAR(NVL(DBMS_LOB.GETLENGTH(XDBUriType(any_path).getclob()), 0) )
FROM XDB.resource_view
WHERE any_path LIKE ('/%')

The statement works correct.

But for a big file (100 MB), the statement is very slow.

All I want is the size. Is there a faster way (PL/SQL, Java, SQL).

Regards Lars
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 27 2006
Added on Aug 28 2006
6 comments
1,556 views