Tuesday, October 20, 2020
    Home Sql Tutorial You should maintain your sql statement identical

    You should maintain your sql statement identical

    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.

    - Advertisement -

    Take an example:

    select * from emp;

    SELECT * from emp;

    - Advertisement -

    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.

    - Advertisement -
    - Advertisment -

    Most Popular

    oracle 19c new features – Automatic Indexing

    A major Oracle 19c autonomous database new Feature automatic indexing using DBMS_AUTO_INDEX some details and how to article.

    Differences Raw Device, ASM Device and CFS

    The article explains basic differences of ASM device, raw device and Oracle cluster file system cfs with fundamentals

    What is a Database Administrator?

    The blog post explains what is the work of database administrator called DBA in database domain and what is the importance.

    Top Reasons to Implement Remote Database Monitoring

    The blog post explains top three reasons and ideas to get remote monitoring services from outer support company.

    Recent Comments