Hi, I do not see how you can do much about this, it is how it has been "optimized" by BMC.
To know in detail, you may need to turn on API-logging as well. I suspect that you are seeing first a ARGetListEntry(WithFields), followed by an ARGetMultiplEntries. I guess they have been lazy in this case, as they should only need the ARGetListEntry(WithFields) call when you do not need any fields such as big character fields. Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011) Products from RRR Scandinavia (Best R.O.I. Award at WWRUG10/11): * RRR|License - Not enough Remedy licenses? Save money by optimizing. * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs. Find these products, and many free tools and utilities, at http://rrr.se. > Hi Folks, > > I have a basic question about how web services work. > > I have defined a "get-list" web service that takes a user-specified > qualification and returns the "Entry-Id" (field C1) of the records that > match the qualification. No other fields are returned. I was expecting > this > to generate a single SELECT and return C1. But I am seeing something quite > different in the SQL logs. > > I do see the expected SELECT, something like this: > > SELECT > T282.C1,C8,C3,C7,C536870935,C536870938,C536870913,C536870967,C6,C536870940,C536871010,C536870973 > FROM T282 WHERE (T282.C3 >= 1322715600) ORDER BY C536870935 DESC,C3 ASC, 1 > ASC > > But instead of returning the C1 values from that SELECT, the server > fetches > each record individually to get the C1 values. I see "a bunch" of SELECTs > like the following: > > SELECT C1,C1,C1 FROM T282 WHERE C1 IN ('01605119', '01605121', '01605122', > '01605123', '01605124', '01605125', '01605126', '01605127', '01605128', > '01605129', '01605130', '01605131', '01605132', '01605133', '01605134', > '01605135', '01605136', '01605137', '01605138', '01605139', '01605140', > '01605142', '01605143', '01605144', '01605145', '01605146', '01605147', > '01605149', '01605152', '01605153', '01605155', '01605156', '01605157', > '01605158', '01605159', '01605160', '01605161', '01605162', '01605163', > '01605164', '01605165', '01605166', '01605167', '01605168', '01605170', > '01605171', '01605172', '01605173', '01605174', '01605175', '01605176', > '01605177', '01605178', '01605179', '01605180', '01605181', '01605183', > '01605184', '01605185', '01605186', '01605187', '01605188', '01605189', > '01605190', '01605191', '01605192', '01605193', '01605194', '01605195', > '01605196', '01605198', '01605199', '01605200', '01605201', '01605202', > '01605203', '01605204', '01605205', '01605206', '01605207', '01605208', > '01605209', '01605210', '01605211', '01605212', '01605213', '01605214', > '01605215', '01605216', '01605217', '01605218', '01605219', '01605220', > '01605221', '01605222', '01605224', '01605225', '01605226', '01605227', > '01605228') > > Am I correct in my understanding of what is happening? > > Is there any way to avoid this extra fetching of the records to get > information that the server already has? This adds significantly to the > time needed to produce the results. > > > ARS 7.6.03 > Mid-tier 7.6.04 > Solaris 10 > Oracle 11.2.0... > > Thanks for any insights. > Larry > > Larry Robinson > Remedy Developer / Admin > NC State University > > _______________________________________________________________________________ > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org > attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are" > _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"