I'm wondering if using by AsParallel
would speed up my code in the way we use it.
I write here some very simplified pseudo code, to illustrate what I have in mind:
Let's say 3 SqlCommand
under the same SqlConnection
like this (pseudo code):
RunADOQueryForRequest() // returns one row
RunADOQueryForRequestAnswer() // returns about 100 rows
RunADOQueryForOtherStuff() // returns about 1000 rows (slow query)
then create 3 List of Objects (DTO's) that holds all that data:
MakeRequest()
MakeRequestAnswers()
MakeOtherStuffList()
Would it improve the performance if i would run that code as parallel (3 Parallel Tasks) ?
I know there are much if and whens. But is it worth it to write such code for Parallel?