If there are very very many users reading the same object(table, page or evern row) at the same time, would performance be gotten down?

  • I know SQL Server has locks and latch to protect read and write.

    If there are very very many users reading the same object(table, page or evern row) at the same time, would performance be gotten down?

    In Oracle, it will protect the datapage when reading. So far as I know, a select statement will create S lock on the object (row,page,table...)when reading, but others can also add S lock on it. I guess it is the same for latch. So if there are many users acceesing the same object, certiainly it will be load to memory for reading, but how is the performance going then?

    Expecting for the answers!

  • There is a shared lock (S) on the data, but that prevents exclusive locks being placed on the page/row/table for changes. It doesn't impact read performance.

    As you noted the data will be in memory, so it's a question of accessing memory and copying the data to a buffer that is returned to the user. AFAIK, this is extremely scalable. I wouldn't think 1000 people reading the same data would be slowed down by the access in memory. It might be in copying that data out to 1000 network buffers for return to the clients, but that would be a hardware limitation for 1000 users, not the SQL code.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply