I have a select query, i would like to run it 50 times in parallel(to load test) ie. 50 independent times(a separate process).
if i run like this
for (int i=0;i<=49;i++)
{
//record start time before the query
//Code that runs the select query...
//record end time after the query
}
I need to test the select query for 50 times, do I need to use 50 different threads or running that query in for loop 50 times, which is the correct approach?
Is there better way to check the consumption time of the query for say 50 times ? Do i need to use threads? I am not sure how to use Threads, don't have much idea of threaded programming, any sample will help.