Every application, small or big, online or batch, OLTP or warehouse, all interact with the database using SQL. SQL could be either in the form of data manipulation language (DML) through INSERT, UPDATE, and DELETE operations; data definition language (DDL) in the form of CREATE, ALTER, and DROP; or in the form of queries where they SELECT and retrieve data from the database. SQL operations of any kind should be efficiently written to perform optimally and give good response times.
Performance of an SQL operation is driven by the optimizer behavior and the plan generated by the optimizer when the SQL is executed. The behavior ...