[bdbxml] Paging/controlling result set?
"Antony Grinyer" <antony.grinyer-TjPRh57ScDpaa/[email protected]> Thu, 8 Sep 2005 11:57:13 +0100
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <989E1989F3130042879B902D1758421630F88E@msxmigration.cswgroup.local> |
Hi, We run queries on a large container that potentially brings back hundreds of thousands of results from XQueries. We get BDBXML:allocate():Out of memory errors, which I'm sure is because we're trying to collect these results all at one in a StringBuffer (not good!). Is there any way in DB XML to control the result set coming back? e.g. caching or paging, so the user is not presented with thousands of results at one time? Also, does the DB XML caching environment property increase performance? Our environment is set with: EnvironmentConfig envConf = new EnvironmentConfig(); envConf.setAllowCreate(true); envConf.setInitializeCache(true); envConf.setInitializeLocking(true); envConf.setInitializeLogging(true); envConf.setTransactional(true); Thanks, Ant ________________________________ From: Manish Rai Jain [mailto:[email protected]] Sent: 07 September 2005 11:13 am To: John Snelson; [email protected] Subject: Re: [bdbxml] XQuery problem Thanks a lot again! Working properly. THis is how my query looks like: ... where (some $r in $s satisfies contains($r, "FABG1_BRANA")) or (some $x in $l satisfies contains($x, "Xylitol")) or $m = "1.2.3.4" ... Regards Manish On 9/7/05, John Snelson <[email protected]> wrote: Manish Rai Jain wrote: > I am trying to query across a container. Basically, the query is to have > 3 conditions. If ANY of these is TRUE, then return the result. > ************************************************************************ > for $x in collection("bulk.dbxml")/gnv_enzyme_pathway/db_entry > let $m := $x/enzyme_id > let $s := $x/swissprot_reference_list/reference/@name > where some $r in $s > satisfies contains($r, "FABG1_BRANA") > return > <result> > <Enzyme_id id="{$m}"></Enzyme_id> > </result> > ************************************************* > > In this query, I need to add another condition, which will go like > ..... > where some $r in $s satisfies contains($r, "FABG1_BRANA") OR if > $m="1.1.1.10" > return > ..... > > But, this is not working properly. Any ideas/suggestions how to add > these conditions in xquery. The "where" clause should look like this: where some $r in $s satisfies contains($r, "FABG1_BRANA") or $m = "1.1.1.10 " John -- John Snelson, Berkeley DB XML Engineer Sleepycat Software, Inc http://www.sleepycat.com Contracted to Sleepycat through Parthenon Computing Ltd http://blog.parthcomp.com/dbxml