You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Patrick Vankeirsbilck <Pa...@az.vub.ac.be> on 2002/06/14 16:55:38 UTC
Performance Xindice vs Tamino
Dear Mark,
I am coming back to the tests by Kimbro you mentioned some time ago (see below). Is there any additional info available? I haven't seen any follow-up on this.
For general intrest, I give here some numbers relative to a single query on a 2.4 MB collection composed of 787 documents.
Here is the code performing the query:
String xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and //Event/DateTime<'2001-02-01']";
XPathQueryService service =(XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
A typical XML document looks as follows and takes about 2.5 kB:
<EmdResult>
<Patient>
<Id>B261D1W</Id>
<LastName>THE GREAT</LastName>
<FirstName>ALEXANDER</FirstName>
<Street>BIG BANG STREET 25</Street>
<Zip>3456789900</Zip>
<City>MARS</City>
<Sex>V</Sex>
<BirthDate>1706-10-14</BirthDate>
<Age Unit="jaren">275</Age>
</Patient>
<Request>
<RequestDateTime>3001-15-22</RequestDateTime>
<RequestingHcActor Oid="OrganizationSrv::THcActor(u80803)">
<Name>DR. FRANKENSTEIN</Name>
<OgNr>1766</OgNr>
<PersId>M751BL00R</PersId>
</RequestingHcActor>
<RequestingService>
<Id>CGYN</Id>
</RequestingService>
<Events>
<Event Oid="emd::CBXMLEvent(B261014CYTOLOGIE0_LABALABA|0)">
<PerformingHcActor Oid="OrganizationSrv::THcActor(1000006)">
<Name>JULIUS CAESAR</Name>
<OgNr />
<PersId>V621</PersId>
</PerformingHcActor>
<ResponsableHcActor Oid="OrganizationSrv::THcActor(5981)">
<Name>DR. FEELGOOD</Name>
<OgNr>1981</OgNr>
<PersId>9BN00H</PersId>
</ResponsableHcActor>
<DateTime>3001-24-06</DateTime>
...
</Event>
</Events>
</Request>
</EmdResult>
I have put an index on the Event and DateTime tags.
The query takes about 26 seconds using Xindice. Using the commercial Tamino Server, I get about half of these timings.
I have seen similar figures in earlier discussions in this list.
For the kind of queries shown above, we aim at timings below 5 seconds. Is this realistic?
Patrick.
=======================================================================
Are there any stats that could be dug up and posted about the testing that
Kimbro did? I'm currently creating some adhoc ones on my own, to try to see
what the limitations are.
Dan
-----Original Message-----
From: Mark J. Stang [mailto:markstang@earthlink.net]
Sent: Saturday, May 04, 2002 4:32 PM
To: xindice-users@xml.apache.org
Subject: Re: Performance with large databases
It should. Kimbro has done some tests and it looks fast. How fast do you
need to be? Is it a multi-user project?
Mark
Dan Barron wrote:
> I'm considering Xindice for a project here. It's so easy to use and does
all I need it to do. But my concern is performance. The project I'm thinking
of will require a DB with in the neighborhood of 5 million records, each and
XML file of 5-15K. I don't know too much about our hardware other than they
are Sun and are maintained by our IS department so I'm sure they're
up-to-date hardware. Performance is crucial because the database will serve
dynamic data live to a website.
>
> I was wondering if anyone with experience could tell me if Xinidice would
handle this. Any one out there with large databases?
>
> Any help would be appreciated.
>
> dan
>
> ____________________________________________________________________
> Daniel W. Barron
> Senior Systems Analyst/Application Developer
> American College of Physicians-American Society of Internal Medicine
> Tel: (215) 351-2617 Tel: (800) 523-1546 x2617
> Fax: (215) 351-2644 E-mail: dbarron@mail.acponline.org
Re: Performance Xindice vs Tamino
Posted by Vanessa Williams <v....@acm.org>.
Steven Noels wrote:
> Patrick Vankeirsbilck wrote:
>
>> Dear Mark,
>>
>> I am coming back to the tests by Kimbro you mentioned some time ago (see
>> below). Is there any additional info available? I haven't seen any
>> follow-up on this.
>>
>> For general intrest, I give here some numbers relative to a single query
>> on a 2.4 MB collection composed of 787 documents.
>> Here is the code performing the query:
>>
>> String xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and
>> //Event/DateTime<'2001-02-01']";
>>
>
> I would assume that this kind of query using the '//' Path Expression
> still needs to traverse each node in the repository testing whether it
> is an EmdResult element.
>
> Is it not possible to rephrase your query without '//'?
This is an excellent point. In my experience, '//' *drastically* increases
matching time for most Xpath engines. We avoid its use at all costs. In this
query, it's used twice.
> Regards/groetjes,
>
> Steven Noels
> http://outerthought.org/
>
Re: Performance Xindice vs Tamino
Posted by Steven Noels <st...@outerthought.org>.
Patrick Vankeirsbilck wrote:
> Dear Mark,
>
> I am coming back to the tests by Kimbro you mentioned some time ago (see
> below). Is there any additional info available? I haven't seen any
> follow-up on this.
>
> For general intrest, I give here some numbers relative to a single query
> on a 2.4 MB collection composed of 787 documents.
> Here is the code performing the query:
>
> String xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and
> //Event/DateTime<'2001-02-01']";
>
I would assume that this kind of query using the '//' Path Expression
still needs to traverse each node in the repository testing whether it
is an EmdResult element.
Is it not possible to rephrase your query without '//'?
Regards/groetjes,
Steven Noels
http://outerthought.org/
Re: Performance Xindice vs Tamino
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Try
String xpath = "/EmdResult[Events/Event/DateTime>'2000-12-31' and Events/Event/DateTime<'2001-02-01']";
to avoid having to scan every document completely looking for EmdResult elements that are not the root, and Event elements which are not in the known path from EmdResult.
If this is still slow, then Mark's suggestions should be tried, and an enhancement request filed for xindice that it improve the way it determines what index to use in the case of a conjunctive condition in an xpath.
Jeff
----- Original Message -----
From: Patrick Vankeirsbilck
To: xindice-users@xml.apache.org
Sent: Friday, June 14, 2002 7:55 AM
Subject: Performance Xindice vs Tamino
Dear Mark,
I am coming back to the tests by Kimbro you mentioned some time ago (see below). Is there any additional info available? I haven't seen any follow-up on this.
For general intrest, I give here some numbers relative to a single query on a 2.4 MB collection composed of 787 documents.
Here is the code performing the query:
String xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and //Event/DateTime<'2001-02-01']";
Re: Performance Xindice vs Tamino
Posted by Patrick Vankeirsbilck <Pa...@az.vub.ac.be>.
Dear Stefan,
interesting to read your performance figures, really promising.
As you suggested, I deleted my collection, created a new one, added 5 indices and only afterwards I loaded the documents.
However, the performance didn't get any better.
Clearly, I must be doing something fundamentally wrong.
Can you be more specific about your configuration?
Thanks,
Patrick VKB
----- Original Message -----
From: Stefan Lischke
To: xindice-users@xml.apache.org ; Patrick Vankeirsbilck
Sent: Tuesday, June 25, 2002 2:16 PM
Subject: AW: Performance Xindice vs Tamino
Hi,
> important performance improvements. However, when I again removed the indices to see what their contribution was in this gain, the timings hardly changed. Is there a more appropriate choice for the placement of the indices, hoping to reduce the timings even further?
This looks like of the Indexer Problem. U have to create the index first and then add the documents. I'm running 3 Gigs of Files in my Xindice with some Indexes and it hardly takes a tenth of a second to query those datas.
mfg stefan
P.S.
look in ur db/[ur collection] directory, if the index file is big enough
AW: Performance Xindice vs Tamino
Posted by Stefan Lischke <li...@novacom.net>.
Hi,
> important performance improvements. However, when I again removed the
indices to see what their contribution was in this gain, the timings
hardly changed. Is there a more appropriate choice for the placement of the
indices, hoping to reduce the timings even further?
This looks like of the Indexer Problem. U have to create the index first and
then add the documents. I'm running 3 Gigs of Files in my Xindice with some
Indexes and it hardly takes a tenth of a second to query those datas.
mfg stefan
P.S.
look in ur db/[ur collection] directory, if the index file is big enough
Re: Performance Xindice vs Tamino
Posted by Patrick Vankeirsbilck <Pa...@az.vub.ac.be>.
Dear list members,
thanks for your replies. I was out of office last week, hence my late reply.
I have some new figures based upon your suggestions: use of indices and avoidance of '//' in the query statement.
I now use the query string as suggested by Jeff:
String xpath = "/EmdResult[Request/Events/Event/DateTime>'2000-12-31' and Request/Events/Event/DateTime<'2001-02-01']";
Indices were placed using XindiceBrowser at the EmdResult, Request, Events. Events and DateTime tags. Using again my collection of 787 XML documents I obtain the following query timings (Pentium II under Windows NT):
Xindice : 13.5 secs
Tamino: 7s
The timings have been reduced by a factor of 2 for both servers compared to my previous posting. Tamino now approaches closely the 5 sec limit we have set forth as a requirement. Indeed, and as suggested, avoiding '//' in the query statement gives important performance improvements. However, when I again removed the indices to see what their contribution was in this gain, the timings hardly changed. Is there a more appropriate choice for the placement of the indices, hoping to reduce the timings even further?
Regards,
Patrick VKB
----- Original Message -----
From: Mark J. Stang
To: xindice-users@xml.apache.org
Sent: Friday, June 14, 2002 5:11 PM
Subject: Re: Performance Xindice vs Tamino
Patrick,
I don't remember any other postings, but maybe someone else has some results.
It might be faster to do two queries and then check for an intersection. I don't know
how efficient XPath is. If the indexes are there this should be a lot faster. Try it
with indexes and without indexes. Then try it with only one date search, like the
less than. See how fast that is and see if a compound query is slower. I think
we would all be interested in how that goes!
Mark
Patrick Vankeirsbilck wrote:
Dear Mark, I am coming back to the tests by Kimbro you mentioned some time ago (see below). Is there any additional info available? I haven't seen any follow-up on this. For general intrest, I give here some numbers relative to a single query on a 2.4 MB collection composed of 787 documents.Here is the code performing the query:String xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and //Event/DateTime<'2001-02-01']";
XPathQueryService service =(XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
A typical XML document looks as follows and takes about 2.5 kB:
<EmdResult>
<Patient>
<Id>B261D1W</Id>
<LastName>THE GREAT</LastName>
<FirstName>ALEXANDER</FirstName>
<Street>BIG BANG STREET 25</Street>
<Zip>3456789900</Zip>
<City>MARS</City>
<Sex>V</Sex>
<BirthDate>1706-10-14</BirthDate>
<Age Unit="jaren">275</Age>
</Patient>
<Request>
<RequestDateTime>3001-15-22</RequestDateTime>
<RequestingHcActor Oid="OrganizationSrv::THcActor(u80803)">
<Name>DR. FRANKENSTEIN</Name>
<OgNr>1766</OgNr>
<PersId>M751BL00R</PersId>
</RequestingHcActor>
<RequestingService>
<Id>CGYN</Id>
</RequestingService>
<Events>
<Event Oid="emd::CBXMLEvent(B261014CYTOLOGIE0_LABALABA|0)">
<PerformingHcActor Oid="OrganizationSrv::THcActor(1000006)">
<Name>JULIUS CAESAR</Name>
<OgNr/>
<PersId>V621</PersId>
</PerformingHcActor>
<ResponsableHcActor Oid="OrganizationSrv::THcActor(5981)">
<Name>DR. FEELGOOD</Name>
<OgNr>1981</OgNr>
<PersId>9BN00H</PersId>
</ResponsableHcActor>
<DateTime>3001-24-06</DateTime>
...
</Event>
</Events>
</Request>
</EmdResult>I have put an index on the Event and DateTime tags.The query takes about 26 seconds using Xindice. Using the commercial Tamino Server, I get about half of these timings.I have seen similar figures in earlier discussions in this list.For the kind of queries shown above, we aim at timings below 5 seconds. Is this realistic?Patrick.======================================================================= Are there any stats that could be dug up and posted about the testing that
Kimbro did? I'm currently creating some adhoc ones on my own, to try to see
what the limitations are.
Dan
-----Original Message-----
From: Mark J. Stang [mailto:markstang@earthlink.net]
Sent: Saturday, May 04, 2002 4:32 PM
To: xindice-users@xml.apache.org
Subject: Re: Performance with large databases
It should. Kimbro has done some tests and it looks fast. How fast do you
need to be? Is it a multi-user project?
Mark
Dan Barron wrote:
> I'm considering Xindice for a project here. It's so easy to use and does
all I need it to do. But my concern is performance. The project I'm thinking
of will require a DB with in the neighborhood of 5 million records, each and
XML file of 5-15K. I don't know too much about our hardware other than they
are Sun and are maintained by our IS department so I'm sure they're
up-to-date hardware. Performance is crucial because the database will serve
dynamic data live to a website.
>
> I was wondering if anyone with experience could tell me if Xinidice would
handle this. Any one out there with large databases?
>
> Any help would be appreciated.
>
> dan
>
> ____________________________________________________________________
> Daniel W. Barron
> Senior Systems Analyst/Application Developer
> American College of Physicians-American Society of Internal Medicine
> Tel: (215) 351-2617 Tel: (800) 523-1546 x2617
> Fax: (215) 351-2644 E-mail: dbarron@mail.acponline.org
--
Mark J Stang
Architect
Cybershop Systems
Re: Performance Xindice vs Tamino
Posted by "Mark J. Stang" <ma...@earthlink.net>.
Patrick,
I don't remember any other postings, but maybe someone else has some
results.
It might be faster to do two queries and then check for an
intersection. I don't know
how efficient XPath is. If the indexes are there this should be a lot
faster. Try it
with indexes and without indexes. Then try it with only one date
search, like the
less than. See how fast that is and see if a compound query is
slower. I think
we would all be interested in how that goes!
thanks,
Mark
Patrick Vankeirsbilck wrote:
> Dear Mark, I am coming back to the tests by Kimbro you mentioned some
> time ago (see below). Is there any additional info available? I
> haven't seen any follow-up on this. For general intrest, I give here
> some numbers relative to a single query on a 2.4 MB collection
> composed of 787 documents.Here is the code performing the query:String
> xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and
> //Event/DateTime<'2001-02-01']";
>
> XPathQueryService service =(XPathQueryService)
> col.getService("XPathQueryService", "1.0");
>
> ResourceSet resultSet = service.query(xpath);
>
> A typical XML document looks as follows and takes about 2.5 kB:
> <EmdResult>
> <Patient>
> <Id>B261D1W</Id>
> <LastName>THE GREAT</LastName>
> <FirstName>ALEXANDER</FirstName>
> <Street>BIG BANG STREET 25</Street>
> <Zip>3456789900</Zip>
> <City>MARS</City>
> <Sex>V</Sex>
> <BirthDate>1706-10-14</BirthDate>
> <Age Unit="jaren">275</Age>
> </Patient>
> <Request>
> <RequestDateTime>3001-15-22</RequestDateTime>
> <RequestingHcActor Oid="OrganizationSrv::THcActor(u80803)">
> <Name>DR. FRANKENSTEIN</Name>
> <OgNr>1766</OgNr>
> <PersId>M751BL00R</PersId>
> </RequestingHcActor>
> <RequestingService>
> <Id>CGYN</Id>
> </RequestingService>
> <Events>
> <Event Oid="emd::CBXMLEvent(B261014CYTOLOGIE0_LABALABA|0)">
> <PerformingHcActor Oid="OrganizationSrv::THcActor(1000006)">
> <Name>JULIUS CAESAR</Name>
> <OgNr/>
> <PersId>V621</PersId>
> </PerformingHcActor>
> <ResponsableHcActor Oid="OrganizationSrv::THcActor(5981)">
> <Name>DR. FEELGOOD</Name>
> <OgNr>1981</OgNr>
> <PersId>9BN00H</PersId>
> </ResponsableHcActor>
> <DateTime>3001-24-06</DateTime>
> ...
> </Event>
> </Events>
> </Request>
> </EmdResult>I have put an index on the Event and DateTime tags.The
> query takes about 26 seconds using Xindice. Using the commercial
> Tamino Server, I get about half of these timings.I have seen similar
> figures in earlier discussions in this list.For the kind of queries
> shown above, we aim at timings below 5 seconds. Is this
> realistic?Patrick.======================================================================= Are
> there any stats that could be dug up and posted about the testing that
>
> Kimbro did? I'm currently creating some adhoc ones on my own, to try
> to see
> what the limitations are.
>
> Dan
>
>
> -----Original Message-----
> From: Mark J. Stang [mailto:markstang@earthlink.net]
> Sent: Saturday, May 04, 2002 4:32 PM
> To: xindice-users@xml.apache.org
> Subject: Re: Performance with large databases
>
>
> It should. Kimbro has done some tests and it looks fast. How fast
> do you
> need to be? Is it a multi-user project?
>
> Mark
>
> Dan Barron wrote:
>
> > I'm considering Xindice for a project here. It's so easy to use and
> does
> all I need it to do. But my concern is performance. The project I'm
> thinking
> of will require a DB with in the neighborhood of 5 million records,
> each and
> XML file of 5-15K. I don't know too much about our hardware other than
> they
> are Sun and are maintained by our IS department so I'm sure they're
> up-to-date hardware. Performance is crucial because the database will
> serve
> dynamic data live to a website.
> >
> > I was wondering if anyone with experience could tell me if Xinidice
> would
> handle this. Any one out there with large databases?
> >
> > Any help would be appreciated.
> >
> > dan
> >
> > ____________________________________________________________________
>
> > Daniel W. Barron
> > Senior Systems Analyst/Application Developer
> > American College of Physicians-American Society of Internal Medicine
>
> > Tel: (215) 351-2617 Tel: (800) 523-1546 x2617
> > Fax: (215) 351-2644 E-mail: dbarron@mail.acponline.org
--
Mark J Stang
Architect
Cybershop Systems
2x++good Re: Performance Xindice vs Tamino
Posted by Peter Elliott <ax...@paradise.net.nz>.
On Fri, 14 Jun 2002 12:38:29 -0700
Tom Bradford <to...@xqrl.com> wrote:
>
> So considering all of this, if Tamino is only 2 times as fast, then I'd
> say we've done a damn good job with Xindice.
>
double plus plus good
cheers
peter
RE: Performance Xindice vs Tamino
Posted by Richard Francis-Jones <ri...@cbcl.co.uk>.
-----Original Message-----
From: Tom Bradford [mailto:tom@xqrl.com]
Sent: 14 June 2002 20:38
To: xindice-users@xml.apache.org
Subject: Re: Performance Xindice vs Tamino
On Friday, June 14, 2002, at 07:55 AM, Patrick Vankeirsbilck wrote:
> I am coming back to the tests by Kimbro you mentioned some time ago
> (see below). Is there any additional info available? I haven't seen
> any follow-up on this.
>
> For general intrest, I give here some numbers relative to a single
> query on a 2.4 MB collection composed of 787 documents.
> Here is the code performing the query:
> String xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and
> //Event/DateTime<'2001-02-01']";
You shouldn't use the self-or-descendent axis (//) in XPath queries
unless you truly believe that the EmdResult element can exist anywhere
in the document and not just the root. Basically, what you're telling
the XPath engine to do is examine 'every' element from the root of the
document down to all leaf nodes, which is incredibly inefficient. Same
applies to //Event, if event is only possibly a child of EmdResult, then
the // is not needed.
The Xindice query engine will be able to narrow out the documents with
the appropriate DateTime ranges using indexes, but the XPath query
itself will still be incredibly slow.
The performance difference between Xindice and Tamino at this point will
have to do with several factors.
1) Tamino was written in C, Xindice is pure Java
2) Tamino has been optimized to hell and back, Xindice has had almost
*no* optimization.
3) Tamino was written by a team of *many* developers who had previous
experience implementing Adabas, Xindice was written by two (with only
one core DB developer)
4) Tamino continues to be developed by highly paid full time
developers. Xindice can only benefit from part-timers.
So considering all of this, if Tamino is only 2 times as fast, then I'd
say we've done a damn good job with Xindice.
--
Tom Bradford - http://www.tbradford.org
Architect - XQRL (XQuery Engine) - http://www.xqrl.com
Apache Xindice (XML Database) - http://xml.apache.org/xindice
Labrador (Web Services Hub) - http://www.notdotnet.org/labrador
Re: Performance Xindice vs Tamino
Posted by Tom Bradford <to...@xqrl.com>.
On Friday, June 14, 2002, at 07:55 AM, Patrick Vankeirsbilck wrote:
> I am coming back to the tests by Kimbro you mentioned some time ago
> (see below). Is there any additional info available? I haven't seen
> any follow-up on this.
>
> For general intrest, I give here some numbers relative to a single
> query on a 2.4 MB collection composed of 787 documents.
> Here is the code performing the query:
> String xpath = "//EmdResult[//Event/DateTime>'2000-12-31' and
> //Event/DateTime<'2001-02-01']";
You shouldn't use the self-or-descendent axis (//) in XPath queries
unless you truly believe that the EmdResult element can exist anywhere
in the document and not just the root. Basically, what you're telling
the XPath engine to do is examine 'every' element from the root of the
document down to all leaf nodes, which is incredibly inefficient. Same
applies to //Event, if event is only possibly a child of EmdResult, then
the // is not needed.
The Xindice query engine will be able to narrow out the documents with
the appropriate DateTime ranges using indexes, but the XPath query
itself will still be incredibly slow.
The performance difference between Xindice and Tamino at this point will
have to do with several factors.
1) Tamino was written in C, Xindice is pure Java
2) Tamino has been optimized to hell and back, Xindice has had almost
*no* optimization.
3) Tamino was written by a team of *many* developers who had previous
experience implementing Adabas, Xindice was written by two (with only
one core DB developer)
4) Tamino continues to be developed by highly paid full time
developers. Xindice can only benefit from part-timers.
So considering all of this, if Tamino is only 2 times as fast, then I'd
say we've done a damn good job with Xindice.
--
Tom Bradford - http://www.tbradford.org
Architect - XQRL (XQuery Engine) - http://www.xqrl.com
Apache Xindice (XML Database) - http://xml.apache.org/xindice
Labrador (Web Services Hub) - http://www.notdotnet.org/labrador