开发者

Realtime SQL Results ASP.Net

开发者 https://www.devze.com 2023-03-16 17:10 出处:网络
We are developing a web based application to run queries against our databases, so our ops team can exec开发者_JAVA百科ute queries through web based interfaces rather than loggin into the sql server.

We are developing a web based application to run queries against our databases, so our ops team can exec开发者_JAVA百科ute queries through web based interfaces rather than loggin into the sql server.

Is there anyway i can show large results in realtime like its displayed in the query analyzer. i cannot use pagination here as the query will be written by the user every time.

Thanks


Maybe, you could use infinite scroll?


Yes you could - I guess it would probably go a little bit like this:

  1. User submits the query
  2. Server executes the query and starts processing the results
  3. When the server has read N rows (e.g. N = 100,000) the server sends back those N rows to the client, with a flag indicating that there are more results to come
  4. The client displays those results and also submits another query "Give me some more results please"
  5. The server continues to read rows from the results
  6. Repeat from 3. until all rows have been read.

The key is choosing a good value for N - the smaller it is the more responsive the UI, however the larger it is the faster the overall transfer of results will be.

0

精彩评论

暂无评论...
验证码 换一张
取 消