1.

What are the points to be considered for creating a fast performing stored procedure?

Answer»

Locks allow SEAMLESS functioning of the SQL server even in concurrent user sessions. As we as a whole know, different clients need to get to databases simultaneously. So locks come for rescue to keep information from being undermined or NEGATED when numerous clients ENDEAVOR to do data manipulation tasks DML operations, for example, read, compose and update on DATABASE. "Lock is characterized as a component to guarantee information integration, consistency while enabling simultaneous access to information. It is utilized to execute simultaneous control when various clients get to Database to control its information in the meantime".

Locks can be applied to various database components. Please find below areas where a lock can be applied :

  • RID: (Row ID) This helps us in locking a single row inside a table.
  • Table: It locks the whole table, even data, and indexes as well.
  • Key: It intends to lock key available in tables. It implies the primary key, Candidate Key, Secondary key and so forth.
  • Page: The page represents an 8-kilobyte (KB) data page or index page. The lock can be placed on Page Level additionally, it implies if a specific page is locked so another CLIENT can't refresh the information on it.
  • Extent: Extent is represented by a Contiguous gathering of eight data pages that can incorporate index pages moreover.
  • Database: Entire Database can be locked for some sort of clients who have read authorization on the database.


Discussion

No Comment Found