Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8668 bites

Page 46

Databases & Architecture2 min read

How does columnar storage speed up analytics?

Columnar stores each column contiguously, so aggregations read only needed columns, scan far less data, and compress better with vectorized execution.

Databases & Architecture1 min read

Star schema vs snowflake schema trade-offs?

Star keeps dimensions denormalized for fewer joins and faster simpler queries; snowflake normalizes dimensions into sub-tables saving space and easing maintenance but adding joins.

Databases & Architecture1 min read

What is the difference between ETL and ELT?

ETL transforms before loading, on a separate engine; ELT loads raw then transforms inside a scalable warehouse. Choose ELT with cloud warehouses and large raw or schema-on-read data.

Databases & Architecture1 min read

What is a star schema?

A central fact table of measures and foreign keys surrounded by denormalized dimension tables of descriptive attributes, joined in one hop for fast, simple analytical queries.

Databases & Architecture1 min read

What is the difference between OLTP and OLAP?

OLTP handles many short read-write transactions on normalized current data; OLAP runs few large analytical scans over denormalized historical data.

Databases & Architecture1 min read

What consistency do you sacrifice in an AP system?

You give up linearizability and often sequential consistency, accepting stale reads and conflicts, then mitigate with quorums, vector clocks or CRDTs, and…

Databases & Architecture1 min read

How do you keep consistency without multi-document transactions?

A Saga runs a sequence of local transactions, each with a compensating action to undo on failure, coordinated via choreography or orchestration.

Databases & Architecture1 min read

Why fit Cassandra to a high-read, high-write workload?

Consistent-hash partitioning spreads load, replication and no single master give availability, log-structured writes are fast, tunable consistency balances per query.

Databases & Architecture1 min read

What are eventual consistency and the BASE model?

Eventual consistency means replicas converge given no new writes; BASE is Basically Available, Soft state, Eventually consistent.

Databases & Architecture1 min read

Embed or reference likes in a document database?

Embedding is fast for small bounded lists but unbounded likes hit document size limits; referencing scales for high-cardinality, write-heavy likes.

Databases & Architecture1 min read

What is the CAP theorem?

Consistency, Availability, Partition tolerance; during a network partition you must choose between staying consistent or staying available.

Databases & Architecture1 min read

How do you choose between relational and NoSQL databases?

Relational gives schema, joins, and ACID for structured related data; document gives flexible schema and horizontal scale for varied or denormalized data.

Databases & Architecture2 min read

How does a hash join handle memory overflow?

The build table is partitioned by hash and spilled to disk, then probe rows are partitioned the same way, and pairs are joined per partition.

Databases & Architecture2 min read

Sorting data larger than memory

External merge sort reads memory-sized chunks, sorts each in RAM and writes them as sorted runs to disk, then merges many runs together in passes until one sorted output remains.

Databases & Architecture2 min read

Hash join versus sort-merge join

Hash join builds and probes a hash table, great for unsorted equality joins with enough memory; sort-merge sorts both inputs then merges, winning when inputs are already sorted or output must…

Databases & Architecture2 min read

Joining a large table with a small one

With a tiny table the optimizer often picks a hash join, building a hash table on the small side in memory, then probing it once per row of the large table in a single pass.

Databases & Architecture1 min read

Why developers read query plans

The plan shows the operators the optimizer chose to run a query; developers read it to find why a query is slow; a common thing to look for is a full table scan where an index was expected.

Databases & Architecture1 min read

Stages of executing a SELECT query

Parse the SQL into a tree, bind and validate against the catalog, optimize into a physical plan, then execute the plan operators fetching data and returning rows.

Databases & Architecture2 min read

Using page LSN to decide redo

Each page stores the LSN of its last applied change; during redo the engine reapplies a log record only if its LSN exceeds the page's LSN, meaning the change is not yet reflected on disk.

Databases & Architecture2 min read

Row-oriented versus columnar storage

Row stores keep whole rows together, ideal for point reads and writes; columnar stores keep each column contiguous, enabling reading only needed columns and strong compression, ideal for scans and…