The previous article “How To Use 80/20 Rule To Tune A Database Application I “ demonstrated how the 80/20 Rule can be applied to evaluate the...
You may suffer from SQL statements with a slow first execution time due to the long data cache process. The following SQL is simple that retrieves...
The following is an example that shows a SQL statement with an Exists subquery. The SQL retrieves records from the DEPARTMENT table that DPT_ID is...
The following is an example shows a SQL statement with an IN List expression. The SQL retrieves records from EMPLOYEE table that EMP_DEPT should...
Here the following is an example SQL statement with a DECODE expression syntax. select * from employee where decode(emp_dept, 'AAA',...
Here is an example SQL that retrieves data from EMPLOYEE table with employee’s ID code in EMP_SUBSIDIARY table. select * from employee a where...
The following is an example shows a SQL statement with two potential table join paths. “Employee to Department” and “Department to Employee” are...
Here is an example SQL that retrieves data from EMPLOYEE table with “emp_id < 710000” and employee’s department code exists in DEPARTMENT table....
The following is an example shows a SQL statement with a variable on the IN List operator. The SQL retrieve records from EMPLOYEE table that...
Semi-join is introduced in Oracle 8.0. It provides an efficient method of performing a WHERE EXISTS or WHERE IN sub-queries. A semi-join returns...
The LIKE is a logical operator that determines if a character string matches a specified pattern. A pattern may include regular characters and...
The following is an example shows a DELETE SQL statement with subquery. The SQL delete records from emp_subsidiary that should satisfy with three...
Here the following is SQL statement with multiple OR subqueries. SELECT * FROM employee WHERE emp_id IN (SELECT emp_id FROM emp_subsidiary where...
The following is an example shows a SQL statement with “Group by” expression. The SQL retrieve the sum of historical salary from table...
Here the following is a simple SQL statement with a CASE expression syntax. SELECT * FROM employee WHERE CASE WHEN emp_salary< 1000 THEN 'low'...
Here the following is a simple SQL statement with a “< ALL (Subquery)” syntax. SELECT * FROM employee a WHERE a.emp_salary <ALL(SELECT...
Here the following is a very simple SQL statement with two Max() functions in select list. select max(emp_salary),max(emp_id) from employee;...
The following is an example shows a SQL statement with “Not Exists” expression. The SQL retrieve records from emp_subsidiary that satisfy with the...
It is common that the performance is not good if a SQL statement with OR conditions. Let’s have an example show you how to tune those SQL...
Index is used to find data from the table quickly. An index is created on views and tables. It is similar to the book index. If you apply index it...
Separate names with a comma.