Connection timeout on query on large table

后端 未结 4 2033
难免孤独
难免孤独 2021-01-04 04:08

I have a problem with a script timing out while fetching data form a query on large table.

The table have 9,521,457 rows.

The query I\'m trying to preform is

4条回答
  •  耶瑟儿~
    2021-01-04 05:15

    Set the CommandTimeout on the command object

    var command = connection.CreateCommand();
    command.CommandTimeout = 0;
    //zero specifies never timeout. 
    //Any number greater than zero is the number of seconds before 
    //the command will time out.
    

提交回复
热议问题