c# - EF stored proc getting called twice -


i have stored procedure takes 2 seconds run , return table sql server management studio. returns 8k records. when run ef takes 1 min run , return. turn on debugging below line op code , notice runs proc twice. both in 30 seconds. have ideas why ef doing this? have control on this? there way speed up? how many records returned seems dictate if it's called once or twice. have example returns 2k records , runs proc once. have return 8k+ , runs twice. never seems run more twice can see.

dbcontext.database.log = s => system.diagnostics.debug.writeline(s);   var data = dbcontext.getdata(param1, param2);  opened connection @ 6/27/2014 9:33:36 -05:00  [dbo].[getdata]   -- param1: 'test' (type = ansistring, size = 8000)  -- param2: 'test2' (type = ansistring, size = 8000)  -- executing @ 6/27/2014 9:33:36 -05:00  -- completed in 30309 ms result: sqldatareader    [dbo].[getdata]   -- param1: 'test' (type = ansistring, size = 8000)  -- param2: 'test2' (type = ansistring, size = 8000)  -- executing @ 6/27/2014 9:34:07 -05:00  -- completed in 30753 ms result: sqldatareader 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -