• [Quote] Most of the people here won't take the approach you're using. I'm not sure what is completely your goal. [/Quote]

    So what is your suggestion for inserting the data externally not from the database itself. I'm inserting the data and checking the performance for each loop how much time it is taken to insert that's is why i have used prepare statement for each and every statement.

    [Quote]Can you show us what is the code sent to SQL Server for your 5 row insertion?[/Quote]

    I have already given my approach in the above

    connectionString = ("server=MYServerName;Database=MYDB;User id=XXXXX;Password=XXXXXXX;");

    then comes the insertion

    command.CommandText = "SELECT Getdate() ";

    StartTime = (DateTime)command.ExecuteScalar();/*Getting the StartTime*/

    Console.WriteLine(StartTime.ToString("MM/dd/yyyy hh:mm:ss.fff tt"));

    command.CommandText = "Insert into test (Col1, Col2);

    command.Prepare();

    for (int i = 0; i < count; i++) /*Loop Starts heres*/

    {

    command.Parameters.AddWithValue("@param1", 0);

    command.Parameters.AddWithValue("@param2", 0);

    }

    command.CommandText = "SELECT Getdate() ";

    EndTime = (DateTime)command.ExecuteScalar();/*Getting the EndTime*/

    Console.WriteLine(StartTime.ToString("MM/dd/yyyy hh:mm:ss.fff tt"));

    i= 1,5,50,100.... 10000k

    Thanks!