Question

If one (select) query is run against database and it takes 10mins to finish, what is with performance of the server while this query is running? To be more precise, is it possible to run other queries at the same time and how does this "long" one affect speed performance?

Thanks, Ilija

Was it helpful?

Solution

Database engines are designed for multiple concurrent users. Data and execution plans are cached and re-used, it has it's own scheduler etc

There are some exceptions:

  • a badly structured query can run 100% CPU on all cores
  • a long running UPDATE or INSERT or transaction can block other users
  • not enough memory means paging and thrashing of data through cache
  • ... and lots more edge cases

However, day to day it shouldn't matter and you won't know the 10 minute query is running.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top