Click here to Skip to main content
15,893,994 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Entity Framework : Too slow when executing the first query Pin
Richard MacCutchan24-May-15 21:42
mveRichard MacCutchan24-May-15 21:42 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc24-May-15 21:50
satc24-May-15 21:50 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Richard MacCutchan24-May-15 22:15
mveRichard MacCutchan24-May-15 22:15 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc24-May-15 22:49
satc24-May-15 22:49 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Richard MacCutchan24-May-15 23:09
mveRichard MacCutchan24-May-15 23:09 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc24-May-15 23:15
satc24-May-15 23:15 
SuggestionRe: Entity Framework : Too slow when executing the first query Pin
Richard Deeming27-May-15 2:10
mveRichard Deeming27-May-15 2:10 
AnswerRe: Entity Framework : Too slow when executing the first query Pin
Eddy Vluggen24-May-15 23:30
professionalEddy Vluggen24-May-15 23:30 
How did you measure it being "too slow"? Did you find a "faster" way?

It may be faster the second time for a number of reasons, like having an open and authenticated connection, having the table in cache, SQL Servers' optimizer, SQL Servers' memory being paged from disc, etc. Yes, with 401 records, SQL Server will have to look at all the records - but should be fast indeed once they are in the cache - depending on the column-definition, it may hold the entire table there.

Of that first query, how long is it really executing the task on SQL Server, and how does that compare to the total waiting time?
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

AnswerRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 3:46
mveDave Kreskowiak25-May-15 3:46 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 6:34
satc25-May-15 6:34 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 6:37
mveDave Kreskowiak25-May-15 6:37 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 6:49
satc25-May-15 6:49 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 8:04
mveDave Kreskowiak25-May-15 8:04 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 8:15
satc25-May-15 8:15 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 13:05
professionalMycroft Holmes25-May-15 13:05 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Sascha Lefèvre25-May-15 15:12
professionalSascha Lefèvre25-May-15 15:12 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 15:45
professionalMycroft Holmes25-May-15 15:45 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Dave Kreskowiak25-May-15 16:16
mveDave Kreskowiak25-May-15 16:16 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 17:03
professionalMycroft Holmes25-May-15 17:03 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 17:30
satc25-May-15 17:30 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 19:43
professionalMycroft Holmes25-May-15 19:43 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 20:03
satc25-May-15 20:03 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Sascha Lefèvre25-May-15 17:50
professionalSascha Lefèvre25-May-15 17:50 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
Mycroft Holmes25-May-15 19:38
professionalMycroft Holmes25-May-15 19:38 
GeneralRe: Entity Framework : Too slow when executing the first query Pin
satc25-May-15 19:42
satc25-May-15 19:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.