DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Procedures vs SQL

  1. #1
    Join Date
    Jan 2000
    Posts
    387

    Procedures vs SQL

    Hi

    Will the performance be better when using procedures rather than using SQL in the programming codes?

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    depends how good your code is doesnt it

  3. #3
    Join Date
    Mar 2002
    Location
    Manchester, England
    Posts
    202
    yes (and maybe no ).

    Generally in my experiance yes. passing SQL with variables (or calling procedures and passing it varialbes) will be more efficient than just hitting the database with SQL containing literals.

    This kind of explains it

    I'm sure there are hundreds of other reasons that my tiny mind doesn't grasp

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    and who said you cannot use bind variables using plain SQL...?!

  5. #5
    Join Date
    Jan 2003
    Location
    Delhi
    Posts
    63
    in case of store procedure ,u can keep the pkg in shared pool using dbms_shared_pool . performance will be better.

  6. #6
    Join Date
    Mar 2002
    Location
    Manchester, England
    Posts
    202
    Originally posted by pando
    and who said you cannot use bind variables using plain SQL...?!
    good point...I seem to be answering a different question

  7. #7
    Join Date
    Sep 2002
    Posts
    376
    A stored procedure is pre-loaded in memory for faster execution. It allows the DBMS control of permissions for security purposes. It also eliminates the need to recompile components when minor changes occur to the database.

  8. #8
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    If you can do it in a single statement, do it - This is faster than any other method.
    If you can't, then do it in PL/SQL procedure.

    Tamil

  9. #9
    Join Date
    Jan 2000
    Posts
    387
    If the SQL is a joined query or it involves a few tables, so does it helps to use a procedure even though it can be written in a single statement?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width