Re[2]: [bdbxml] Suggestion: XmlIndexLookup to return the number of referred keys
Steve Howe <[email protected]> Mon, 17 Apr 2006 14:22:07 -0300
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Organization | ACME |
| Message-ID | <[email protected]> |
Hello George, Monday, April 17, 2006, 11:20:08 AM, you wrote: > Thanks for the idea. What you are asking is pretty much available. > One way is to do what you are saying: > 1. Use XmlIndexLookup() using LAZY_EVALUATION and DBXML_LAZY_DOCS > 2. iterate the results, counting. Lazy evaluation never creates a > large > result set. > Granted, the overhead of creating XmlValue objects exists, as does > walking the index, but that's the most reliable way to get the > information. Yes, I wanted precisely to avoid that iteration overhead - in a large resultset, it could be very wasteful. > There does exist the interface, XmlContainer::lookupStatistics(), which > returns an object that has information about the index passed. > One piece of information is the number of entries in the index. > So, you could use that interface as well, if you'd find it useful. That seems to be it, although it is a bit hidden and I could not find it on the first sight :). Too bad it won't work with the XmlIndexLookup object, and I will have to pass the index specification to the XmlContainer. Is tehre a fast way to retrieve that information only by using only the XmlIndexLookup object ? Thanks, George. -- Best regards, Steve mailto:[email protected] ------------------------------------------ To remove yourself from this list, send an email to [email protected]