Chapter 13. Defining and Using XML Indexes

This chapter looks at defining and using XML indexes to improve performance. The main reasons why you want to define indexes on XML data are the same as for relational data; that is, to evaluate predicates efficiently and to avoid table scans. Just like you define relational indexes on selected columns of a relational table, you define XML indexes on selected elements and attributes within a single XML column of a table. In particular, XML indexes in DB2 do not automatically index all the values in an XML column, but only the ones that you choose. Although you can choose to index all elements and attributes, you should typically index just those elements and attributes that are frequently used ...

Get DB2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.