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:
- User submits the query
- Server executes the query and starts processing the results
- 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
- The client displays those results and also submits another query "Give me some more results please"
- The server continues to read rows from the results
- 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.
精彩评论