|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS Feature Index XML Documents with VTD-XML
How to turn the indexing capability on in your application
By: Jimmy Zhang
Feb. 20, 2008 02:15 PM
VTD+XML in 30 Seconds
A Simple Example <root/> The first four-byte word of the corresponding index file is 0x0102A000 containing:
The byte order of all the ensuing 32-bit or 64-bit words is platform-dependent and specified in the third byte of the VTD+XML spec. The next eight-byte words indicate the size (in bytes) of the XML document, which equals seven in this example. Immediately following (0x3C726F6F742F3E00) is the byte content of the XML rounded up to an integer multiple of eight bytes by padding zero to the end. The remaining part of VTD+XML index consists of multiple adjacent segments each containing an eight-byte word (0x0000000000000002 indicating the VTD record or LC entry count) followed by the actual content of the VTD records or LC entries. The first eight-byte word (0x000000000000000002) indicates that there are two VTD records that are 0xDFF0000000000000 and 0x0000000400000001. The remaining three eight-byte words all have the value of zero indicating that the location caches in level one, two, and three have zero entry in the VTD+XML index. As the final output, the VTD+XML index for "<root/>" is 88-bytes long and looks like the following hex:
0x0102A00000040001 0x0000000000000000
Benefits and Limitations
• General Purpose - Before
VTD+XML, most native XML indices only optimize specific types (e.g.,
the axis) of Xpath lookups. If an input query differs slightly from the
index type, the query execution still has to resort to expensive
parsing. Due to this limitation, many native XML databases today
require users to create multiple indices, one for each input query type
so users can benefit from those indices. The problem is that XML
database applications usually serve many types of queries that are
unpredictable and complex in nature, often rendering the benefits of
indexing insignificant. In comparison, VTD+XML is the first index that
completely eliminates the cost of XML parsing and predictably speeds up
any type of XPath query. It also works with namespaces exceptionally
well. XML JOURNAL LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING XML NEWS
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||