Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7067697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:14:01+00:00 2026-05-28T05:14:01+00:00

I am using oracle 11g and have a table with an XMLType. There are

  • 0

I am using oracle 11g and have a table with an XMLType. There are many records in this table and each XML contains a list of 0 to n answers as follows:

<section>
  <answer id="100">
    <value>Something</value>
  </answer>
  ...
</section>

There are two ways to xpath for values.

Example 1:

extract(table.column, '//answer[@id=100]').getStringVal()

which returns

<answer id="100">
  <value>Something</value>
</answer>

Example 2:

extractvalue(table.column, '//answer[@id=100]/value/text()')

which returns

Something

There is a hit in performance extracting many text() values for a complex query, which has me asking the following question. Would I gain better performance if I utilized a library like xstream to parse out those values in java (example 1), or is it better to let oracle parse those values for me (example 2)?

I am trying to learn from other people’s experiences or maybe some whitepapers before I commit time to rewrite a lot of daos and queries, so anything is much appreciated, thanks!

================== EDIT

Started looking into using Scala as an alternative to parsing xml in the JVM. Feel free to add Scala examples to the mix.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:14:02+00:00Added an answer on May 28, 2026 at 5:14 am

    I finally got around to testing and here is what I found.

    For a simple "reporting" jsp view using a table, I ran a query to populate 850 rows.

    Given my codebase, I ran the query first as follows:

    • Query contained 3 left joins on XMLTypes for each record.
    • Each record extracted 15 "Example 2" values.
    • Each value did not need XStream processing.

    This took a total of:

    8.27 seconds to run the query alone.

    15 seconds total to go from start to a finished view

    I then altered the query to do following:

    • Query contained 3 left joins on XMLTypes for each record.
    • Each record extracted 15 "Example 1" values.
    • Each value also ran XStream processing to extract value(s).

    This took a total of:

    24.84 seconds to run the query alone.

    60 seconds total to go from start to a finished view.

    This is of course my codebase, but I think I can rule out the use of XStream as a mean of efficiency. But it seems that the XMLType and xpathing is not very efficient in the first place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table
I'm using Oracle 11g R2. I have a table with 9.1 billion rows. When
On an Oracle 11g engine using PL/SQL I have logic that runs like this
Using Oracle 11g release 2, the following query gives an ORA-01790: expression must have
we have written a C# 3.5 client talking to an Oracle database (11g) using
We have an Oracle 11g database table with around 35 million rows. We are
I am using Oracle 11g, and I have a lot of stored procedure code
My application using Oracle 11g as backend. We have a multiple BLOB Columns in
I have an Oracle Date column in a db table, and fetching this field
I am using Oracle 11g client, with ODP.NET. I am trying to add conditional

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.