Wednesday, September 19, 2018

Oracle PL/SQL Tuning tips

Oracle PL/SQL Tuning tips

There are several proven techniques for improving the speed of PL/SQL execution and they are presented below in order of importance:
Use bulk collect:  When reading-in lots of related rows, bulk collect can run 10x faster than a conventional loop.  This tuning is possible because Oracle reduces context switches into a single operation.
Use forall:  When loading a table from an array, the forall operator is 10x faster than a conventional SQL insert statement.  Again, this is because of the reduction of context switching.
Use SQL analytics:  Many advanced data operations can be done without using PL/SQL and are readily available as a SQL built-in function.
Use implicit cursors:  Implicit cursors are faster in PL/SQL than explicitly defining cursors

No comments:

Post a Comment

SQL Important Queries

  How to delete rows with no where clause The following example deletes  all rows  from the  Person.Person  the table in the AdventureWork...