Pl/Sql

  • Dynamic Unpivot Using JSON_DATAGUIDE

    In this post I will explore a way to generate and run unpivot queries dynamically in PL/SQL. We will build a utility package to dynamically create unpivot queries using json and leveraging json_dataguide to create json_table and unpivot sql expressions. read more

  • Table Data Comparison: Row Differences

    A common task that database developers encounter is comparing data between two different sources to see rows with differences. This can be a table that is loaded with new data that needs to be compared with existing rows to see what rows… read more

  • Cursor Basics: Cursor Iteration Controls

    In the previous post we discussed the use of bulk collect and limit to optimize cursor iteration. This gave us a way to see the undocumented bulk prefetch optimization that has been applied behind the scenes to the cursor for loop. Unless… read more

  • Cursor Basics: Bulk Binds

    In the previous post we discussed the most basic approaches to iterating through a resultset using cursors. Since those approaches traverse the cursor one row at a time they are often referred to as slow by slow processing. This slowness turns out… read more

  • Cursor Basics: A Fetching Difference

    There are some techniques that are really basic to what we do everyday as PL/SQL developers. There is a tendency to automatically do these basic things in the same way without considering the alternatives that the particular situation might merit. In this… read more

  • Writing Excellent Code

    Once you have started to absorb the fact that there are many ways to accomplish a given programming task, you should find yourself asking questions like the following. What is the best way to do this? Are there rules and standards for… read more