Here the following is a simple SQL statement with a CASE expression syntax. SELECT * FROM employee WHERE CASE WHEN emp_salary<...
Here the following is an Update SQL with a subquery that updates the EMPLOYEE table if the emp_dept satisfies the records returned from a...
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...
Here the following is an example SQL shows you that select the maximum emp_address which is not indexed in the EMPLOYEE table with 3 million...
For some SQL statements with multiple Max() functions in the select list and nothing in the Where clause, we have different methods to create new...
We know the order of the columns in a composite index will determine the usage of the index or not against a table. A query will use a composite...
For some SQL statements that are failed to be tuned by syntax rewrite, hints injection, and all necessary indexes are built, people may think that...
Here the following is the description of the ORDERED hint. The ORDERED hint causes Oracle to join tables in the order in which they appear in the...
There are some SQL statements with performance problem can be tuned by Hints injection only. Here is an example to show you how to use...
Some mission-critical SQL statements are already reached their maximum speed within the current indexes configuration. It means that those SQL...
We have discussed how to tune a CASE expression SQL with hardcoded literals in my last blog: How to Tune SQL Statement with CASE Expression for...
Here the following is a simple SQL statement with a CASE expression syntax. SELECT * FROM EMPLOYEE WHERE CASE when emp_id < 1001000 then 'Old...
There are some SQL statements with performance problem have to be tuned by SQL syntax rewrite and Hints injection, it is a little bit difficult...
Your end-users may keep on complaining about some functions of their database application are running slow, but you may found that those SQL...
The following is an example that shows a SQL statement with an EXISTS subquery. The SQL counts the records from the EMPLOYEE table if the OR...
Here the following is a simple SQL statement with a “< ANY (Subquery)” syntax. SELECT * FROM employee WHERE emp_salary< ANY (SELECT emp_salary...
For SQL statements that are not executed frequently, so that the relevant data is no longer exists in the buffer cache, a cold cache will...
Some SQL statements will be running very slow after SET ROWCOUNT or TOP is used. SET ROWCOUNT and TOP are used to tell SQL Server to select a...
In my last article How to Tune SQL Statement with EXISTS Subquery for SQL Server I? | Go4Expert that a SQL statement with an Exists subquery was...
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...
Separate names with a comma.