search for a list of InoId?

funny… If my $list has one InoId, the query returns in less than a second. However, if I add a second InoId to the list, it never returns, and I get the time out message. I’m running Tamino 4.2.1.1 on HP-UX.

{-- search by picklist --}
declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction

{-- picklist --}
for $list in (1, 2)
return

for $doc in input()/document 
where tf:getInoId($doc) eq $list
return
	$doc/title

. . .
<ino:messagetext ino:code=“INOXYE9291”>Transaction aborted because it has taken too long</ino:messagetext>

Eventually I need to write an update query for a few hundred documents, in a sluggish db of 300,000 docs. But for now I’m just trying to figure out how to query a list of ID’s. The SQL would be something like:
SELECT title
FROM documents
WHERE id IN (1,2,…)

Hi,

There seems to be a problem in the Tamino XQuery processor. I would suggest that you rewrite your query in the following way:

declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction

for $doc in input()/document
where tf:getInoId($doc) = 1 or tf:getInoId($doc) = 2
return
$doc/title

Best Regards,

Thorsten

Just an FYI - I attempted to do something like this as well except I wanted to delete several instances based on their inoIds. The SQL would be:

DELETE FROM TableName WHERE TableNameId IN (?, ?, ?, ?)

I tried this at first:

declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction
update for $i in (1, 5, 9, 11, 29)
for $item in input()/Item
let $itemid := tf:getInoId($item)
where $itemid = $i
do delete $item/…

The above query worked, but it deadlocked whenever two of them were run concurrently (despite the fact that the $i sequence is unique/never intersects for each query).

At the moment I am simply deleting them one at a time, but I will probably need to optimize it by creating a bunch of ORs in the WHERE clause.