Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> context index size

context index size

From: <hosu_at_cs.umbc.edu>
Date: Sun, 24 Dec 2000 04:56:38 GMT
Message-ID: <923vm5$9bk$1@nnrp1.deja.com>

Merry Christmas!

Here I am using Oracle 8.1.6 on NT. I have a table to store XML documents, which has the the following columns:

VALUE: XML data; (CLOB)
PATH: path expression; (VARCHAR2)
RPATH: reverse path expression; (VARCHAR2)

Then, I create a context index, set the preference of user_datastore, which has a stored procedure to create index on mulitple columns: PATH, VALUE, and RPATH on the fly.

The table has about 30,000 rows (very small XML data, 1k size). When the index is built, I found that 550MB was used by observing the disk usage from NT. However, if I simply create context index on the column VALUE, it would consume less than 10MB. or are there any tools to measure the index?

Can anyone explain for me? Attached please find the procedure. Thank you!

Honglin

PS:

create or replace procedure myproc
(rid in rowid, tlob in out clob)
is offset number:=1;

v_value clob;
v_path varchar2(128);
v_rpath varchar2(128);

begin

    if dbms_lob.istemporary(tlob) <> 1 then

      raise_application_error (-20000,
        '"IN OUT" tlob is not temporary');
    end if;

    select path, value, rpath into

           v_path, v_value, v_rpath
        from xmldocuments where rowid=rid;

    dbms_lob.trim (
      lob_loc     => tlob,
      newlen      => 0

);

    dbms_lob.write (

      lob_loc     => tlob,
      amount      => length(v_path),
      offset      => 1,
      buffer      => v_path

);

    if not (v_value is null or

            dbms_lob.getlength(v_value)<1)     then

      dbms_lob.copy (
        dest_lob    => tlob,
        src_lob     => v_value,
        amount      => dbms_lob.getlength(v_value),
        dest_offset => length(v_path) + 2,
        src_offset  => 1
      );

    end if;

    dbms_lob.write (

      lob_loc      => tlob,
      amount       => length(v_rpath),
      offset       => dbms_lob.getlength(tlob) + 2,
      buffer       => v_rpath

);

end myproc;

Sent via Deja.com
http://www.deja.com/ Received on Sat Dec 23 2000 - 22:56:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US