Hello,

We have two connected documents and we need to insert some data from
the first one while processing the second one.

We have a query like this (for processing of
collection("samples")/root/item elements):

declare function local:good($n, $att) as xs:boolean
{
if (
not(empty(
$n/c...@name = $att]
) )
and
$n/c...@name = $att] != "null"
and
$n/c...@name = $att] > 1
)
then
true()
else
false()
};

for $it in
collection("samples")/root/item[position() <= 1]
let
  $t1 := $it/c...@name = "a"]/text()
, $t2 := $it/c...@name = "b"]/text()
, $date := $it/c...@name = "c"]/text()
, $m :=
collection("myChild")/root/item[
c...@name = "a"]/text() = $date
and
c...@name = "b"]/text() = $t1
and
c...@name = "c"]/text() = $t2
]
return
if(
local:good($it,"FT1")
and
local:good($it,"FTX")
and
local:good($it,"FT2")
)
then
<input>
<data0>
{
$m/c...@name = "FT1"]
, $m/c...@name = "FTX"]
, $m/c...@name = "FT2"]
}
</data0>
<cur>
{
$it/c...@name = "FT1"]
, $it/c...@name = "FTX"]
, $it/c...@name = "FT2"]
}
</cur>
</input>
else
()

Processing of it is too slow (Sedna Admin shows `[17:41:31.347] Done
(execution time: 48532 ms)'.).

We created indexes like this:
CREATE INDEX "index1" ON  fn:collection("myChild")/root/item/c BY
@name AS xs:string
CREATE INDEX "index2" ON  fn:collection("myChild")/root/item BY
c/@name AS xs:string

But it does not help.

1) What may be wrong?
2) Is is possible to speed up the access to the data of second
document (collection("myChild"))?
3) Is it possible to force Sedna to use free memory (RAM) as much as possible?

-- 
Regards,

   -Andrey

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to