Performance problems with ExecuteRelationshipQueryAsync for Feature service

1558
2
12-21-2010 10:25 AM
MarkusHjärne
New Contributor
Hi,

I originally posted this in the Silverlight/WPF API Forum, but there I was recommened to post it here instead.

When we tried using QueryTask.ExecuteRelationshipQueryAsync() to get related objects (from a list of source object ids) through a 1-1 relation in the map service, we saw that it was very slow and when including more than ten or something source object ids we got a timeout from the map service.

Tracing the database we saw that for each source object id the following SQL was excuted (TB_Adress.DBO.TBLeveransstopp being the related feature class):

declare @p1 int
set @p1=304
exec sp_prepare @p1 output,NULL,N'select OBJECTID, Shape from TB_Adress.DBO.TBLeveransstopp ',1
select @p1

And since TB_Adress.DBO.TBLeveransstopp contains over 568,000 rows this query took about 4 seconds.

When we tried to repeat this using the REST API directly in the browser (which we could), we noticed that we were using the FeatureServer endpoint. So then we tried the REST API using the MapServer endpoint, and then the performance was good (and we didn't see the SQL query above in the database trace).

So, is this performance difference between MapServer and FeatureServer when querying related records expected or is it a bug?

Our test environment is ArcGIS Workgroup Server 10.0 SP1 on SQL Sever 2008 Express R2.
0 Kudos
2 Replies
RaviNarayanan
Esri Contributor
Markus,
Thank you for this posting. This is a known issue in Feature server and here is the link to the bug submitted for this issue:
http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYzNzY2
0 Kudos
MarkusHjärne
New Contributor
Thanks for your answer. I think we can workaround it for now using the MapServer endpoint, but we hope it gets fixed in a service pack.
0 Kudos