Courses
SQL Intermediate: Queries That Survive Real Data
Check Yourself: Indexes and Transactions
Five scenario questions on plans, index use, isolation levels and row locks. If you miss more than one, reread the lessons in this section.
Course content
Join this Course
Sign in to save your progress.
-
Joins Beyond the Basics
-
Three-Table Joins Without Double Counting
-
Subqueries, EXISTS and IN: Which One When
-
-
-
Thinking in Sets
-
CTEs: Break a Long Query Into Named Steps
-
UNION, INTERSECT and EXCEPT
-
-
-
Windows and Dates
-
Window Functions: ROW_NUMBER, RANK and Running Totals
-
Dates, Times and Time Zones in PostgreSQL
-
-
-
Schema Design That Holds
-
Normalization: Where to Split and Where to Stop
-
UNIQUE, CHECK and Foreign Key Actions
-
-
-
Indexes and Transactions
-
Indexes and EXPLAIN: Why That Query Is Slow
-
Transactions and What Two Users Can See
-
-
- Final Check: SQL Intermediate
1.
EXPLAIN ANALYZE shows a Seq Scan with Rows Removed by Filter at 99900 and 100 rows returned. What does it suggest?
2.
There is an index on customer_id, but WHERE customer_id + 1 = 43 uses a Seq Scan. Why?
3.
An index exists on order_date, and a query that selects nearly every row still uses a Seq Scan. What should you do?
4.
In a READ COMMITTED transaction you run the same SELECT twice. Between them, another session commits a change to one of the rows. What do you see?
5.
Session A has updated a row and not committed. Session B tries to update the same row. What happens to B?
About
Five scenario questions on plans, index use, isolation levels and row locks. If you miss more than one, reread the lessons in this section.
- Duration
- 5 min
- Last update
- 10/02/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.