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...
I showed you how to tune an Update statement with a simple subquery in my last blog, a more complex update statement will be discussed in the...
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 an Update SQL statement with an “IN” subquery. It updates records from emp_subsidiary that satisfies the “IN”...
The following is an example shows a SQL statement with “Not Exists” expression. The SQL retrieve records from emp_subsidiary that satisfy with the...
CTE stands for common table expression. A CTE allows you to define a temporary named result set that available temporarily in the execution scope...
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...
It is common that we used to count the number of records in a table. You may encounter unexpected performance degradation in certain situations....
The LIKE is a logical operator that determines if a character string matches a specified pattern. A pattern may include regular characters and...
There may be some business requirements that need to compare certain part of a column as a data retrieval criteria. Here is an example SQL that...
There may be some business requirements that need to retrieve the first N number of rows from a join tables. Some people may encounter unexpected...
There may be some business requirements that needs to retrieve only some rows from a table (or join tables) randomly. This kind of SQL is normally...
World’s Leading A.I. SQL Rewrite technology for MySQL database Manually rewriting SQL syntax to tune a SQL statement is commonly adopted by...
It is common we come across SQL with Like '%Alex%' in MySQL that no index will be used. Here is one of the rewrite solution that may help in your...
Tosska SQL Tuning Expert for MySQL It is not just another SQL tuning tool There are not many SQL tuning tools for MySQL database, but most of...
There are at least two commonly used methods to improve an SQL statement’s performance. First, users can influence Oracle SQL optimizer to pick up...
I came across with a SQL statement from a user as a testing case to our product, the SQL is joining 4 tables with data retrieved from system table...
SQL Patches is part of the features provided by SQL Repair Advisor which is used to fix a SQL statement’s critical failures such as returning...
The following SQL is simple, but the explain plan is a little bit complex. Oracle SQL optimizer uses an adaptive plan to execute the SQL...
Separate names with a comma.