From: Ralph C. <ra...@ra...> - 2023-03-13 14:17:37
|
Hi all, I was going to post this in an xQuery forum, but at small numbers this query works fine and I feel confident that the issue here is in my exist-db config. I'm trying to return orphaned <ref> elements from a recent update that was set up wrong. I'm using the following query to get the results: > for $ref in > subsequence(collection('/db/apps/****/data')//ref[@type='2'],1,####) > > where > not(exists(doc('/db/apps/****/data/listPerson.xml')//person[@xml:id=$ref/@target])) > > return > $ref This returns absolutely fine up to ~1200 items in the subsequence $ref but by the time we get closer to 2000 (and more) this returns a 504 gateway time-out error in roughly 60s. This does not seem to me to be a significantly onerous task (especially considering other things that are handled well). I've tried declare option exist:timeout "600000" (which should be ten minutes) to extend the timeout, but I'm getting the same error after ~60s. Any ideas, as the total I'm trying to get to is ~12000 records of which I have no idea how many are orphaned.... Cheers Ralph |