Question

Not sure where to get this info out to the subsonic crew as they took down their forums, and said use stackoverflow, so here we go.

I've been struggling to achieve maximum performance with an ORM. I love subsonic, and its bulk insert, update, delete obliterates Entity Framework in this context, however for straight simple reads, EF blows subsonic out of the water with 5x faster performance.

I've stripped both down, removed change tracking, foreign properties, navigational properties, everything down to poco.

EF executes a simple select of 1M rows in about 4.8, SubSonic Linq is taking 5x that...

looking at SQL profiler the call is slightly different: Entity Framework: SELECT TOP (1000000) [c].[Id] AS [Id], [c].[ProjectIDL] AS [ProjectIDL], [c].[DescriptorIDL] AS [DescriptorIDL], [c].[FieldIDL] AS [FieldIDL], [c].[Data] AS [Data], [c].[OptionId] AS [OptionId] FROM [dbo].[DescriptorFieldValues] AS [c]

SubSonic:SELECT TOP (1000000) [t0].[Data], [t0].[DescriptorIDL], [t0].[FieldIDL], [t0].[Id], [t0].[OptionId], [t0].[ProjectIDL] FROM [dbo].[DescriptorFieldValues] AS t0

SQL profiler is running a trace and showing a massive duration difference here.
I checked the audit login before both queries and they are identical...

If I run the same query in sql management studio it takes 11 seconds for both queries

Looking into the subsonic 3.04 source, I cannot figure out where I would make the adjustment to make it match EF, but is the query syntax here really making that big of a difference, or is there some magic going on I'm not aware of?

Thanks for your help!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top