Skill Zuno · skillzunos.com · Fullstack
PostgreSQL interview questions
Prepare for PostgreSQL interviews on Skill Zuno. This practice book covers PostgreSQL interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.
Open PostgreSQL on Skill ZunoAlso see the PostgreSQL tutorial.
PostgreSQL is an advanced open-source relational database known for standards compliance, extensibility and reliability. It supports rich data types such as JSONB, arrays and ranges, many index types, and extensions such as PostGIS and pgvector. PostgreSQL interviews cover MVCC, VACUUM, indexing, query plans, transactions, JSONB and replication.
Sample PostgreSQL interview questions
Why does PostgreSQL need VACUUM?
Under MVCC an UPDATE writes a new row version and a DELETE only marks a row dead. VACUUM reclaims the space of dead rows that no transaction can see, and also prevents transaction ID wraparound. Autovacuum does this in the background.
What is the difference between JSON and JSONB?
JSON stores the original text and reparses it on every use. JSONB stores a parsed binary form, drops duplicate keys and whitespace, is faster to query and can be indexed with GIN.
When would you use a GIN index?
GIN indexes the elements inside a value, so it suits JSONB containment queries, array membership, full-text search and trigram similarity with pg_trgm.
What is the difference between EXPLAIN and EXPLAIN ANALYZE?
EXPLAIN shows the planner's estimated plan without running the query. EXPLAIN ANALYZE runs it and shows actual row counts and times, which reveals bad estimates. Wrap data-changing statements in a transaction you roll back.
Why use a connection pooler such as PgBouncer?
Each PostgreSQL connection is a separate process using several megabytes of memory. A pooler lets thousands of client connections share a small number of server connections.
What you can practice
- PostgreSQL interview questions for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- Fullstack topics alongside PostgreSQL on skillzunos.com