阅读背景:

我应该在以下案例实例中使我的SQL查询异步吗?

来源:互联网 

To summarize my issue: I have to make 3 separate calls to 3 different endpoints. I have to do this programatically through a large list of records. Two of the calls are made using asynchronous HTTP requests to two different in which I use aysnc await. The third call I have to make is a query to a MS SQL database that does not have an API wrapper. The two calls to the APIs take ~22 seconds each and the query to the database takes ~2 seconds. Individually this is fine, however when I make the MS SQL query part of the method chain, the entire thing becomes synchronous. And where I would have originally saved the user a lot of time doing simultaneous queries to the two APIs, my app will wait for these queries to be completed before attempting the next call to the database. To summarize my issue: I have to make 3 separat




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: