Skip to main content
edited tags
Link
Shanky
  • 19.1k
  • 4
  • 36
  • 58
added 61 characters in body
Source Link
variable
  • 3.5k
  • 4
  • 36
  • 90

Irrespective of the where clause;

When table is heap (no clustered indexes) then does a select query make sql server to lock all rows until it has finished reading all the rows?

Where as in case of table with clustered index, sql server will lock the rows one by one and release them immediately after that row is read?

Any reference links on this topic will be really helpful.

Irrespective of the where clause;

When table is heap (no clustered indexes) then does a select query make sql server to lock all rows until it has finished reading all the rows?

Where as in case of table with clustered index, sql server will lock the rows one by one and release them immediately after that row is read?

Irrespective of the where clause;

When table is heap (no clustered indexes) then does a select query make sql server to lock all rows until it has finished reading all the rows?

Where as in case of table with clustered index, sql server will lock the rows one by one and release them immediately after that row is read?

Any reference links on this topic will be really helpful.

Source Link
variable
  • 3.5k
  • 4
  • 36
  • 90

Does sql server lock entire table and keep it locked when the table is heap?

Irrespective of the where clause;

When table is heap (no clustered indexes) then does a select query make sql server to lock all rows until it has finished reading all the rows?

Where as in case of table with clustered index, sql server will lock the rows one by one and release them immediately after that row is read?