문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top