November 17, 2004 at 11:17 pm
Threee questions.
1. Does SQL server do multitasking in query processing?
2. Can one assign priority on SQL queries?
Most Important Question
3. Is it possible to pause a query and start another query? Let the second query finish first and then resume the first query? How this can be done in SQL server, or in any data base?
Example:
Query 1 takes 2 hours to finish. Query 2 takes 5 minutes to finish.
Query 1 matches non-urgent job to nurse-availability.
Query 2 matches urgent jobs to nurse-availability. (High priority query)
This means both queries uses same nurse-availability table, and mark availability open slot to "filled" once the job is found for her.
Both query has different set of jobs to process.
Let's say: Query 1 is under process; query 2 came in.
I want query 1 to pause and query 2 to start.
Once query 2 is finished then query 1 should resume where it left off.
Obviously, once query 1 resume it work, it will find less availability slot to fill because some of the availability slot might have been filled by the query 2 (urgent) job.
Munzer
November 22, 2004 at 8:00 am
This was removed by the editor as SPAM
November 29, 2004 at 1:36 pm
You cannot pause a query once it has begun. You can kill it but I suspect that this is not what you want to accomplish.
Your solution probably lies more in how the two queries have been constructed and the underlying schema than in the approaches you have listed.
If you can be a little more forthcoming with details, perhaps we can help to put a better solution in place.
April 15, 2005 at 8:37 am
We also would like to be able to prioritize queries to support a multiuser enterprise system where we are doing "critical" fetches to support screen repaint for a client, and "background" fetches to support look-ahead cache filling in a separate thread for the client. Some DBMS have an "urgency" param that can be set in the query. This might be a useful upgrade for Microsoft to consider, if they really want to keep playing in the enterprise arena. We would go the middle tier route if we had the time, but that probably introduces its own overhead.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply