I have 2 schemes in tamino 4.2, both have 230.000 documents, when attempt to execute a XQuery with a join between this schemes wich have a 9300 doc of result the XQuery it takes 0.125 seg
, wich is ok but when attempt to do the same XQuery with count() it takes 23 seg :shock: wich is very very bad!!! what is the problem with count() an joins? is this a bug of Tamino 4.2 ?? :?:
these are the XQuerys:
1.
for $a in input()/Paciente
where (($a/DatosPersonales/ApellidoPat=‘GONZALEZ’ or $a/DatosPersonales/ApellidoPat=‘PEREZ’ or $a/DatosPersonales/ApellidoPat=‘LOPEZ’) and (for $b in input()/Paciente2 where $a/DatosPersonales/Run=$b/DatosPersonales/Run return ))
return $a 0.125 seg in get the result
.
2.
count(for $a in input()/Paciente
where (($a/DatosPersonales/ApellidoPat=‘GONZALEZ’ or $a/DatosPersonales/ApellidoPat=‘PEREZ’ or $a/DatosPersonales/ApellidoPat=‘LOPEZ’) and (for $b in input()/Paciente2 where $a/DatosPersonales/Run=$b/DatosPersonales/Run return ))
return $a) 23 seg :shock:
:?:
if is the same XQuery with only the count() diference then what is problem with Tamino?
Thanks!!!
Paciente.tsd (17.6 KB)
#API-Management#Tamino#webMethods