Database – How does a SQL database handle simultaneous requests

databasedatabase-performancesql-server-2008

This may be a bit of a noob question, but I'm curious:

How can a database handle multiple simultaneous requests, most notably reads? Is every request placed in a queue, so it really occurs one at a time? Or, with a multicore processor is it possible to actually handle multiple requests at the same time?

I guess an obvious extension to this question then would be: how much does having a multiple core CPU matter to a database server?

I'm specifically thinking about MS SQL Server 2008, but this question is probably applicable to most database servers.

Best Answer

There are lots of different resources that are used to provide a database service (CPU, records on disk, memory locations, etc), and any time there's contention, yes, everything that needs to use that resource gets in line. Whenever there isn't contention (two threads on a multicore system, attempting to access different records in a table) then those requests can proceed in parallel until they contend for some resource again.

Related Topic