LightSwitch related data requests optimization
Asked Answered
D

1

20

I have a SQL Server 2008 table with a lot of foreign keys, when opening this in a screen it takes very long time to load all related data, like 10 seconds... Here's a chart from Fiddler showing loading time, not acceptable at allenter image description here

I'm using Eric Erhardt's technique for creating a Domain Service and load data through. My question is if I somehow can optimize these numbers? I don't understand why it has to be one request per related data, when just making a normal entity without a domain service all related data loads in one request.

Thanks

Dibble answered 29/4, 2013 at 10:59 Comment(6)
How much data are we talking about here?Bambara
It's about 10 columns of foreign keys and less than 1000 rows.Dibble
Can you provide create scripts for the tables and some sample data? I'm not able to replicate a performance issue with my own test code.Liebman
This appears to be a duplicate of #16170391Thumbscrew
It is also duplicated here: #16394063Thumbscrew
Not just a duplicate post, but a duplicate by the same author.Redwood
G
1

Use Unique Clustered Index on the foreign key(S). This will defiantly optimize load, read, fetch performance of SSMS.

Gerent answered 7/12, 2015 at 11:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.