- PL/SQL is my superpower.
PL/SQL is my superpower.
- 1 Introduction
…er in the following pages: Oracle relational database, SQL and PL/SQL. My experience is mostly with ETLs and CRM systems and their attendant analytic reporting systems. My primary …
- 2 Cursors
The single most important capability of PL/SQL is its ability to execute SQL statements and store the results—either into individual variables or into cursors that hold multiple ro…
- 3 Least Privilege
…privilege” philosophy for its databases and because PL/SQL is part of the database this philosophy has spilled over to how it is managed in most organizations. So many times, I hav…
- 4 ETL
A common and practical application of PL/SQL is in the processing of incoming data files—whether from operational systems such as CRM platforms or during data migration from legacy…
- 4.2 Parallelisum and scheduled jobs for ETL and Data warehousing
PL/SQL allows several different ways of doing parallel operations. One important method is to use autonomous scheduled jobs using dbms_scheduler and a concept of a parallel manager…
- 4.2.2.1 The Parallel Manager’s Role
4.2 Parallelisum and scheduled jobs for ETL and Data warehousing
The parallel manager is a PL/SQL package that centralizes all the logic for launching and controlling parallel jobs. Conceptually, it does three things:
- 5.4 The check_point Pattern
5 Logging Manager and Autonomous Error Logging
In PL/SQL, there is no built-in, reliable way to say “I’m at line X” in a way that will still be correct after edits, refactoring, or code formatting changes. Line numbers in error…
- 5.5 Autonomous Error Logging (DEBUG_PKG)
5 Logging Manager and Autonomous Error Logging
…le, reliable way to log diagnostic information from PL/SQL code without ever impacting your main transaction.
- 6.1 Ultra-High-Speed Record Matching with PL/SQL
6 Vectors Are My Superpower
6.1 Ultra-High-Speed Record Matching with PL/SQL
- 6.2 Why Identity Matching Is Harder Than It Looks
6 Vectors Are My Superpower
…-based identity matching pattern that allows Oracle PL/SQL systems to perform millions of deterministic identity comparisons per second, safely, repeatably, and auditable — without…
- 6.10 Why This Belongs in PL/SQL
6 Vectors Are My Superpower
6.10 Why This Belongs in PL/SQL
- 6.11.7 Key Takeaway
6.11 Performance Benchmarks (Practical, Not Theoretical)
In high-volume PL/SQL systems, that combination is more valuable than raw speed alone.
- 6.11.8 Final Thought
6.11 Performance Benchmarks (Practical, Not Theoretical)
… a fast, deterministic, auditable computation — and PL/SQL is one of the best tools on earth for executing that pattern at scale.
- 7.2 What a Database Link Actually Is
7 Database Links Are My Superpower
… core, a database link is a controlled, authenticated, SQL-level network connection between two Oracle databases.
- 7.4 How a Database Link Works (Conceptually)
7 Database Links Are My Superpower
SQL is decomposed into:
- 7.6.2 They Avoid Unnecessary Data Movement
7 Database Links Are My Superpower
stream results directly into SQL operations
- 7.6.3 They Integrate Natively With SQL
7 Database Links Are My Superpower
7.6.3 They Integrate Natively With SQL
- 7.7.2 The Reality
7 Database Links Are My Superpower
the SQL you write,
- 7.7.3.3 Bulk Operations
7 Database Links Are My Superpower
set-based SQL,
- 7.8 Network Tuning: The Hidden Half of Database Link Performance
7 Database Links Are My Superpower
…— it is a direct consequence of performing distributed SQL execution across system boundaries.
- 7.8.1 Transparency Versus Indirection
7 Database Links Are My Superpower
…take the opposite approach. They move data only when a SQL statement demands it, stream only the rows that qualify, and surface network behavior directly through execution plans an…
- 7.8.4 Practical Design Implications
7 Database Links Are My Superpower
…t alone is insufficient; latency dominates distributed SQL behavior.
- 7.8.5 Why This Is Difficult to Negotiate
7 Database Links Are My Superpower
Database teams control SQL, schemas, and execution plans.
- 7.12 Database Link Performance Tuning Checklist
PL/SQL or SQL-driven integration
- 7.12.1 SQL & Query Design (Highest Impact)
7.12 Database Link Performance Tuning Checklist
7.12.1 SQL & Query Design (Highest Impact)
- 7.12.6 PL/SQL Usage Patterns
7.12 Database Link Performance Tuning Checklist
7.12.6 PL/SQL Usage Patterns
- 7.12.7 Monitoring & Diagnostics
7.12 Database Link Performance Tuning Checklist
Look for SQL*Net message from dblink events.
- 7.12.9 Final Rule of Thumb
7.12 Database Link Performance Tuning Checklist
DB links don’t create bad SQL.
- 7.12.10 Final Thought
7.12 Database Link Performance Tuning Checklist
…hanism that operates at the same level of rigor as the SQL engine itself.
- A.2 One possible SQL to query this table would be below
Appendix A: Cursors and Logging Examples
A.2 One possible SQL to query this table would be below
- A.7 Better style cursor, bulk collect with Limit and FORALL
Appendix A: Cursors and Logging Examples
…batches of up to 100 from the v_persons view into a PL/SQL collection. For each batch, the code computes two derived values: birth_year and tax_birth_year. Both are calculated in m…
- A.9 How to monitor memory consumption using PGA memory size
Appendix A: Cursors and Logging Examples
…PGA), which is the private memory allocated to your PL/SQL process. Large collections can consume significant PGA, especially when rows contain many columns or when multiple collec…
- A.11 cursor exceptions, don’t kill me now, report later
Appendix A: Cursors and Logging Examples
…lk insert while still capturing row-level errors. A PL/SQL collection is populated with several test records, some of which intentionally violate table constraints—for example, a N…
- A.12.3 LOG_MANAGER Package Specification
Appendix A: Cursors and Logging Examples
… assertions into a small set of procedures that any PL/SQL code can call. At runtime you typically use CHECKPOINT_START, CHECKPOINT_END, and LOG_ERROR, while ASSERT_CHECKPOINT, TES…
- C.1 SQL Types (Vector + optional element list)
Appendix C: Vector Creation Logic
C.1 SQL Types (Vector + optional element list)
- D.3.1.1 What changes
Appendix D: Working with Network Engineers to Optimize Database Link Performance
Distributed SQL execution is dominated by round-trip latency, not bandwidth. Even small reductions compound quickly.
- D.3.3.1 What changes
Appendix D: Working with Network Engineers to Optimize Database Link Performance
…ases retransmissions — both disastrous for synchronous SQL execution.
- D.4 Where the Encryption Cost Actually Occurs
Appendix D: Working with Network Engineers to Optimize Database Link Performance
…ifies the effect of round-trip latency for synchronous SQL execution.
- D.13 The Architectural Reality
Appendix D: Working with Network Engineers to Optimize Database Link Performance
SQL execution