Row vs column storage, OLTP vs OLAP, data warehouses, lakes and lakehouses, star schemas, ETL/ELT and CDC, time-series storage (partitioning, compression, downsampling, retention, high cardinality), object storage, and backups/PITR.
Intermediate → Advanced6 interview questions
Row vs column storage
Same data, different physical layout, opposite strengths.
10 s raw → 1 min → 1 h aggregates (min, max, avg, count, sum)
Retention policies
raw 15 days, 1-min rollups 90 days, hourly 2 years
Continuous aggregates
incrementally maintained materialised views
Inverted index on labels
label → series IDs for fast filtering
Write buffering
WAL + in-memory head block, flushed as immutable blocks
SQL
-- TimescaleDBCREATE TABLE cpu (ts TIMESTAMPTZ NOT NULL, host TEXT, usage DOUBLE PRECISION);
SELECT create_hypertable('cpu', 'ts', chunk_time_interval =>INTERVAL'1 day');
ALTER TABLE cpu SET (timescaledb.compress, timescaledb.compress_segmentby ='host');
SELECT add_compression_policy('cpu', INTERVAL'7 days');
SELECT add_retention_policy('cpu', INTERVAL'90 days');
CREATE MATERIALIZED VIEW cpu_hourly WITH (timescaledb.continuous) ASSELECT time_bucket('1 hour', ts) AS bucket, host, avg(usage), max(usage)
FROM cpu GROUPBY bucket, host;
Choosing a time-series store
Need
Option
Infra/app metrics, alerting
Prometheus (+ Thanos/Mimir/VictoriaMetrics for HA and long-term)
SQL + joins with relational data
TimescaleDB (Postgres extension)
Huge event analytics, logs
ClickHouse, Apache Druid, Apache Pinot
IoT ingestion
InfluxDB, TimescaleDB, QuestDB
Financial tick data
kdb+, QuestDB, ClickHouse
Object (blob) storage
S3, GCS, Azure Blob: flat namespace of keys → immutable objects, virtually unlimited, 11 nines of durability, cheap, high throughput, higher latency (tens of ms). Store images, videos, backups, data-lake files there; keep metadata (owner, size, key, checksum) in a database. Upload directly from clients with pre-signed URLs, serve through a CDN, use lifecycle rules to move to colder tiers. Since 2020, S3 provides strong read-after-write consistency for all operations.
Backups and recovery
Concept
Meaning
RPO
maximum acceptable data loss (time)
RTO
maximum acceptable downtime
Full / incremental / differential backup
trade backup time vs restore time
PITR
base backup + archived WAL → restore to any moment
3-2-1 rule
3 copies, 2 media types, 1 off-site (plus 1 immutable/offline)
Replication is not a backup: a DROP TABLE replicates in milliseconds.
Interview questions
0 / 6 marked confident
Answer out loud first, then open the model answer. Mark a question confident only when you could explain it to an interviewer without notes.