From: Pierre M. <pie...@sy...> - 2005-11-08 16:35:26
|
Hi all, I have a critical performance problem when performing XQueries over a larg= e amount of docs Material: Intel Centrino 2Gig, 1Gig RAM (DDR2 533MHz) We are currently benchmarking eXist for our application. We put like 50000 generated docs around 10Kb each in one collection. They all are formated the same way: <user id=3D"testCCL219"> <name>testCCL219</name> <firstname>testCCL219</firstname> <function>General</function> <login>Maximus</login> <password>xxxxxx</password> <rigth> <reader>no</reader> <writer>yes</writer> <observer>no</observer> <administrator>no</administrator> </rigth> <mail>pa...@la...</mail> <phone/> <homephone/> <mobil/> <fax/> <creationDate>28/10/2005</creationDate> <adress> <street/> <cp/> <city/> <country/> </adress> </user> In a collection: '/db/test/users' 1) The following query takes 2000ms (I think it's a bit long but still ok)= : let $request_name :=3D string('testCCL219') return <result> { for $doc in xcollection('/db/test/users')/user [ contains(name, $request_name) ] return <user id=3D" {$doc/@id}">{$doc/name}{$doc/firstname}</user<%7B$doc/@id%7D%22%3E%7B$doc/n= ame%7D%7B$doc/firstname%7D%3C/user> > } </result> 2) This second query takes almost twice the time of the forst one (4500ms) !!!!! simply because we have an additional 'and' clause: (If I add more 'and' clause the time almost double for each new 'and') let $request_name :=3D string('testCCL219') let $request_firstname :=3D string('') return <result> { for $doc in xcollection('/db/test/users')/user [ contains(name, $request_name) and contains(firstname, $request_firstname) ] return <user id=3D" {$doc/@id}">{$doc/name}{$doc/firstname}</user<%7B$doc/@id%7D%22%3E%7B$doc/n= ame%7D%7B$doc/firstname%7D%3C/user> > } </result> 3) Last test Query, I want to add a 'lower-case' function ... the time to process becomes almost infinite and somtimes I got an OutOfMemory exception because the Heap is full: let $request_name :=3D string('testCCL219') return <result> { for $doc in xcollection('/db/test/users')/user [ contains(lower-case(name), lower-case($request_name)) ] return <user id=3D" {$doc/@id}">{$doc/name}{$doc/firstname}</user<%7B$doc/@id%7D%22%3E%7B$doc/n= ame%7D%7B$doc/firstname%7D%3C/user> > } </result> We are completly stuck since we are not able to improve the performances even with different syntax. Does anyone have a suggestion or do reach the limits of eXist ? Thanks, Pierre -- ________________________ Pierre Martins +33 (0) 675 190 455 pie...@gm... pie...@sy... |