how to write a query to make its execution time better .And the standards.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manikandaprabhu
    New Member
    • Mar 2008
    • 2

    how to write a query to make its execution time better .And the standards.

    hi all,
    i am manikandaprabhu .
    i want to know the standards used for writing the query . that is if we want to retrieve the data from database from abig table as well as from the small table . first from which table we should retrieve the datas.. like that what are the procedures to be followed to write query in a standard
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Hi,
    The standards for SQL / PLSQL coding varies from one organization to another. The basic standards would be:

    1. All keywords should be in CAPS
    2. Table names, column names should be in Lower case
    3. Variables declared in PLSQL code should start with v_, ie vn_num1 for NUMBER, vc_ename for VARCHAR and so on


    Regarding fetching of data from either a big or small table, it depends on which table actually stores the data, based on which you will retrieve the data from. There are many factors that you can consider to write a good performance Query. Your first step would be to learn about learning SQL, then once you are confident about writing SQL queries, you can look for writien better peroformance queries. Please go step by step learning for better understanding of Oracle SQL and PL/SQL.

    Comment

    Working...