• IBM Consulting

    DBA Consulting can help you with IBM BI and Web related work. Also IBM Linux is our portfolio.

  • Oracle Consulting

    For Oracle related consulting and Database work and support and Migration call DBA Consulting.

  • Novell/RedHat Consulting

    For all Novell Suse Linux and SAP on Suse Linux questions releated to OS and BI solutions. And offcourse also for the great RedHat products like RedHat Enterprise Server and JBoss middelware and BI on RedHat.

  • Microsoft Consulting

    For Microsoft Server 2012 onwards, Microsoft Client Windows 7 and higher, Microsoft Cloud Services (Azure,Office 365, etc.) related consulting services.

  • Citrix Consulting

    Citrix VDI in a box, Desktop Vertualizations and Citrix Netscaler security.

  • Web Development

    Web Development (Static Websites, CMS Websites (Drupal 7/8, WordPress, Joomla, Responsive Websites and Adaptive Websites).

19 May 2010

Make your PL/SQL loops EFFICIENT!!!

Make Loops as Efficient as Possible


Because PL/SQL applications are often built around loops, it is important to optimize both the loop itself and the code inside the loop:



•To issue a series of DML statements, replace loop constructs with FORALL statements.



•To loop through a result set and store the values, use the BULK COLLECT clause on the query to bring the query results into memory in one operation (see "Reducing Loop Overhead with Bulk SQL").



•If you must loop through a result set more than once, or issue other queries as you loop through a result set, you can probably enhance the original query to give you exactly the results you want. Some query operators to explore include UNION, INTERSECT, MINUS, and CONNECT BY.



•You can also nest one query inside another (known as a subquery) to do the filtering and sorting in multiple stages. For example, instead of invoking a PL/SQL function in the inner WHERE clause (which might invoke the function once for each row of the table), you can filter the result set to a small set of rows in the inner query, and invoke the function in the outer query.



And last but not least, use the NOLOGING option!

11 May 2010

Total recall