Hello everyone. I need to improve this query because it takes too much time to get a response. I need to solve it soon and i can’t get a better way to do it
There’s algo a bigger problem: when the result has lots of entries, it gives the following error:
Database access failure (9291, INOXYE9291, Transaction aborted because it has taken too long)
The info in the database is like this:
0123 2008-06-15 16:44:42.87 28 01And my query is:
declare namespace tf=‘http://namespaces.softwareag.com/tamino/TaminoFunction’
declare namespace xs=‘XML Schema’
for $i in input()/Petition
let $endDate := $i/endingDate
where $i/Info[tf:containsText(ZoneCode,‘28’) and tf:containsText(AdminCode,‘01’)]
and xs:string($endDate) >= xs:string(‘2008-06-01 00:00:00’) and xs:string($endDate) <= xs:string(‘2008-06-31 23:59:59’)
sort by ($i/IdPetition)
return {$i/IdPetition/text()}
If someone knows the way to make the query plus effective, or the way to limit the results so that i don’t get the error…
Thank you so much!