1

I am using Oracle Binary XML and will be creating XML Index. What choose structure of the XML file for better search performance? XML Elements or Attributes? For example:

a) Attributes style

<tools>
    <tool number="09201-10000" />
    <name>Valve Guide Bushing Remover & Replacer Set</name>
</tool>

vs

b) Elements style

<tools>
    <number>09201-10000</number>
    <name>Valve Guide Bushing Remover & Replacer Set</name>
</tool>

I will look for "09201-10000"

P.S. Oracle has three types of XML indexing. Function-Based Indexes, Oracle text and XML text. What is better and why?

  • It's very unlikely to make any significant difference, and if it does, it will depend on your workload, so measure it. General advice: if you have a performance problem, this isn't going to solve it, and if you don't have a performance problem, then it's not worth wasting your time on it. – Michael Kay Nov 25 '21 at 09:30
  • this [Oracle article](https://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_indexing.htm#sthref451) says:"Besides accessing XML nodes such as elements and attributes, it is sometimes important to provide fast access to particular passages of text within XML text nodes. This is the purpose of Oracle Text indexes: they index full-text strings." If chosen the elements style, I must use the Oracle Text? – Nikolay Grigoryev Nov 25 '21 at 11:14

0 Answers0