Lists Home |
Date Index |
Christer Nordvik wrote:
> How do you store XML documents in Oracle? I have 200 objects that are
> described in XML and are stored as CLOBs. When I read them from the DB
> they take 0.2-0-3sec to read each. The screen usually consists of 10-20
> objects, and that means that the server uses 2-3sec to generate the
> resulting document(SVG actually). I find 2-3 seconds to be a bit much so
> if anyone have any good ideas they are very welcome.
There are two ways to do this. One is as CLOBs as you are doing. In
Oracle 9i, these can be indexed and queried with XPath, although I'm not
sure that would be of any use to you. The other way is with an
object-relational mapping using the Oracle XML SQL Utility for Java.
In your case, I am curious as to why you are storing the data as XML.
Why not store it directly in object-specific tables or in a generic set
of tables that can be used to describe any object? That would save you
having to parse the XML, which I'm assuming is slower than direct access
to the data.