AITeky Learn

AiTeky Original Interactive Learning & Practice Advanced

Enterprise SQL on Oracle and SQL Server: paging, locks and batches

Page through a big table without it getting slower on every page, reproduce a deadlock and see why locking rows in the same order prevents it, replace a row-by-row loop with one set-based statement, and design a month-end posting batch.

Oracle Database and Microsoft SQL Server run the core systems of banks, hospitals, retailers and governments. Their features are many (stored procedures in PL/SQL and T-SQL, partitioning, editions, clustering), but day-to-day trouble comes from the same few things: reading big tables in pages, locks that make people wait, and batch jobs written one row at a time.

This course teaches those three on a small database that runs in your browser (SQLite) so you can run, change and measure everything. The SQL ideas are the same on both products; where their syntax differs, the lesson says so without pretending to run their exact commands. Check each product's own documentation for exact syntax. All data are made up.

  • Learn lessons explain one idea at a time and let you run it.
  • Industry ready lessons decide and justify, and end with interview questions.

You need solid basic SQL: joins, GROUP BY, UPDATE and transactions.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 30 min Free sample 🔒 AiTeky Pass Paging through a big table: offset versus keyset Show a long list one page at a time, see that asking for page 5,000 with an offset makes the database count past every earlier row, switch to keyset paging that continues from the last key, and learn how each product spells the first page.
  2. 02 35 min 🔒 AiTeky Pass Locks, waits and deadlocks Simulate two transfers that each hold one account and want the other, see the circular wait that is a deadlock and how the database picks a victim, then fix it by always locking in the same order, and learn what to do when a transaction is chosen as the victim.
  3. 03 30 min 🔒 AiTeky Pass Set-based statements instead of row-by-row loops Add interest to 20,000 accounts first with a loop that updates one row at a time, then with a single statement, count the statements and the database work in each, and learn why a loop that is fine on a laptop crawls across a network.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 04 40 min 🔒 AiTeky Pass On the job: designing the month-end posting batch A bank posts interest to 60,000 accounts at month end while the app is live. Compare a row-by-row loop, one huge statement and a chunked set-based job by statements sent, rows locked at once and work lost on failure, pick one, and write the design for the operations lead.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in