I am starting this new section called SQL tutorial. This section doesn’t contain only basic SQL statement written learning but it also contains some guidance and advice from my experience. SQL is called as sequel sometimes. Don’t bother!
Always use SQL writing pattern identical. It means you need to use your writing style pattern unique or same type repeatedly.
Take an example:
select * from emp;
SELECT * from emp;
select * from EMP;
select * FROM emp;
SELECT * FROM EMP;
SELECT * from EMP;
SELECT * FROM emp;
Select * from Emp;
All are the same kind of statements. Looking wise all are the same. The result of the above all statement is also the same but the System Global Area of Oracle memory treats all statements are different. Thus, above all statements will be parsed separately and occupy memory separately. The problem starts with those SQL statements which are written in a different manner.
This is the only example. In real-time if you check your long SQL statements and guess how it will be stored in the Oracle SGA memory region? Those long and big SQL statements will consume so much memory in the Oracle SQL engine. Resulting memory is wastage and unnecessary parsing. Hard parsing always consumes high CPU and SQL statements will consume memory. It means so many performance issues can be occurring due to this bad practice.
I have seen lots of developers and programmer who has its own pattern of SQL statement writing. But when you are changing the company and joining the new company then you should need to observe this thing first for keeping your mind that which writing pattern is being followed by your company’s old employee. Or as the project manager, IT manager you need to develop your own skill and fix the pattern of the Structured Query Language writing method. An example you can keep all table names in uppercase and the rest of all in lower cases. You can keep all in lower case.
Therefore, avoid this kind of silly mistake before you are starting to write a new SQL statement in your company.