Well, we could debate about what it *should* do, but it appears to be doing what it *said* it would do -- namely, if more than one matching request comes back, then use the first one. So it runs your query, returns the result set to the calling workflow object, and the active link or filter decides whether it should throw an error or select the first one, depending on the option you've set.
I can see your point that it would be nice if the API function call itself set the maxRetrieve argument to 1 and returned it. However, I have to admit that most of the time when I use the "first matching request" option, I expect the query to return very few entries -- usually *one*. So I suppose that's why the question never came up. Perhaps before the upgrade your database had cached the underlying table because the query was being run constantly by your users. And now after the upgrade you're seeing the effects of pulling it from disk each time. That's just a shot it the dark, of course. --Tim ________________________________ From: William Rentfrow <[email protected]> To: [email protected] Sent: Wednesday, January 14, 2009 2:24:01 PM Subject: [ARSLIST] 6.3 patch 25 API question ** We have a few Remedy systems we work with here. One is an older system that was on 6.0x. It is being replaced within the year but for a few reasons we needed to upgrade it to 6.3 patch 25. It is running on Solaris. Since the upgrade some previously fine code is quite slow - but no code changes were made. One item in particular is quite slow. There is an AL "Set Fields" action doing a lookup to a join form. This AL has the option of "If Multiple requests match/Use first matching request". In the client side API log I can see the API fetching and returning all of the entries that match the query (+GLE and -GLE X the number of entries) - not just the first one. This whole process takes about a minute - but the first fetch only takes < 1 second. What's up with that? Isn't "Use first matching request" supposed to only fetch one record? William Rentfrow Principal Consultant, StrataCom Inc. [email protected] 701-306-6157 C __Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are" html___ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are"

