databases and live demo
Hi,
I'm currently testing baseX and wondering how one should use databases/collections.
I did some testing with the live demo and Query 6:
Quoted text · 8 lines
> for $pub in doc('dblp')/dblp/* > > > where $pub/author = 'Alexander Holupirek' > > > return $pub/title >
First I was wondering where "in collection" is. Tried it on my local testmachine with "in collection" and several other of my testdocuments in the same collection/database and the query took more than 10 seconds compared to 100ms in the live demo!
Then I found out that you don't need "in collection" if you have just one document in the database. So I dropped all other documents and tried it again: This time the query took 38ms!
Is this intended or am I doing something wrong? When should you use collections/databases?
Are there any hints or best practices how to organize data to get efficient queries?
Krind regards,
Stefan
Hi Stefan,
Quoted text · koch at buit-solutions.com · 7 lines
On Thursday, 3. May 2012 at 20:07, koch at buit-solutions.com wrote: > > > > Hi, > > I'm currently testing baseX and wondering how one should use databases/collections.
Quoted text · koch · 8 lines
> > > I did some testing with the live demo and Query 6: > > for $pub in doc('dblp')/dblp/* > > where $pub/author = 'Alexander Holupirek' > > return $pub/title > > First I was wondering where "in collection" is. Tried it on my local testmachine with "in collection" and several other of my testdocuments in the same collection/database and the query took more than 10 seconds compared to 100ms in the live demo!
Quoted text · koch · 4 lines
> > > Then I found out that you don't need "in collection" if you have just one document in the database. So I dropped all other documents and tried it again: This time the query took 38ms! > Is this intended or am I doing something wrong? When should you use collections/databases?
Quoted text · koch · 3 lines
> > > Are there any hints or best practices how to organize data to get efficient queries?
Quoted text · koch · 4 lines
> > Krind regards, > > Stefan
Quoted text · koch · 7 lines
> > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >
Written for BaseX 7.2. BaseX may have changed since: please check the current documentation.