Skip to content
javabypankaj
HomeLibraryPopularCommunity
13
Database & SQL
17 topics · 141 questions
1SQL Basics: SELECT, WHERE, ORDER BY0/882Joins: INNER, LEFT, RIGHT, FULL, CROSS0/12123Aggregation: GROUP BY, HAVING, COUNT, SUM0/10104Subqueries & CTEs0/775Window Functions: ROW_NUMBER, RANK, LEAD, LAG0/886Indexing0/18187Transactions & ACID0/448Normalization & Schema Design0/779SQL vs NoSQL0/2210Connection Pooling0/6611Query Optimization & EXPLAIN0/512Sharding & Partitioning0/7713Database Internals: B-tree, MVCC, WAL0/1114Stored Procedures, Views & Triggers0/6615Migrations & Schema Changes0/1116Practical SQL Queries0/343417Advanced: Replication, Consistency, CAP0/55
1SQL Basics: SELECT, WHERE, ORDER BY82Joins: INNER, LEFT, RIGHT, FULL, CROSS123Aggregation: GROUP BY, HAVING, COUNT, SUM104Subqueries & CTEs75Window Functions: ROW_NUMBER, RANK, LEAD, LAG86Indexing187Transactions & ACID48Normalization & Schema Design79SQL vs NoSQL210Connection Pooling611Query Optimization & EXPLAIN512Sharding & Partitioning713Database Internals: B-tree, MVCC, WAL114Stored Procedures, Views & Triggers615Migrations & Schema Changes116Practical SQL Queries3417Advanced: Replication, Consistency, CAP5
17 topics141 Qs0%
01Core Java17002OOP3203Collections6704Exception Handling2805Concurrency & Multithreading12706Java Streams, Lambda & Functional Programming32807Spring & Spring Boot2608Transactions3209JPA & Hibernate6910Microservices19411Kafka & Messaging9112DevOps, CI/CD & Tooling13313Database & SQL14114REST API & Web4015Design Patterns & LLD5716Advanced Java7117Coding Problems: DSA49218AWS & Cloud4119Data Engineering19420QA, Testing & SDET4121System Design3522Security2023Behavioral / HR: STAR Method37
17Topics
141Questions
0%Complete
11 of 17 topics
Topics
1SQL Basics: SELECT, WHERE, ORDER BY0/882Joins: INNER, LEFT, RIGHT, FULL, CROSS0/12123Aggregation: GROUP BY, HAVING, COUNT, SUM0/10104Subqueries & CTEs0/775Window Functions: ROW_NUMBER, RANK, LEAD, LAG0/886Indexing0/18187Transactions & ACID0/448Normalization & Schema Design0/779SQL vs NoSQL0/2210Connection Pooling0/66
11Query Optimization & EXPLAIN0/55
12Sharding & Partitioning0/7713Database Internals: B-tree, MVCC, WAL0/1114Stored Procedures, Views & Triggers0/6615Migrations & Schema Changes0/1116Practical SQL Queries0/343417Advanced: Replication, Consistency, CAP0/55

Query Optimization & EXPLAIN

Database & SQL·Topic 11 of 17·5 questions
Q1Explain One-to-One, One-to-Many, Many-to-One, and Many-to-Many relationships in DB design.

One-to-one is a unique foreign key, one-to-many and many-to-one are the two views of a foreign key on the child, and many-to-many needs a junction table with two foreign keys.

Read Answer
Q2How will you optimize a slow query

Read the plan first, fix the dominant cost with the least invasive change (index, rewrite, join, sargability), escalate to partitioning, caching, schema, or hardware only if needed, and re-check the plan every time.

Read Answer
Q3Optimizing a very slow query on a 2 million row table: end to end

Measure first with EXPLAIN ANALYZE, fix the cheapest proven cause, and re-measure after every change.

Read Answer
Q4EXPLAIN vs EXPLAIN ANALYZE: Reading the Query Plan

EXPLAIN shows the plan the optimizer chose with estimates; EXPLAIN ANALYZE runs it and shows actuals: and the first thing you hunt for is a sequential scan on a big table.

Read Answer
Q5Reading a Query Plan for Common Performance Issues

Match the plan against four signatures: unexpected Seq Scan, Nested Loop on a huge outer, costly Sort, and estimate-versus-actual gap: each with a specific fix.

Read Answer
Previous · Topic 10Connection Pooling6 questionsNext · Topic 12Sharding & Partitioning7 questions
javabypankaj© 2026 javabypankaj
PrivacyTerms
HomeSearchLibrary