From the course: Designing Highly Scalable and Highly Available SQL Databases
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Understanding write-ahead logging
From the course: Designing Highly Scalable and Highly Available SQL Databases
Understanding write-ahead logging
- [Instructor] When it comes to implementing read replication, the PostgreSQL database uses a really interesting idea, which is to take advantage of the transaction logs that are there for durability and atomicity. So we're going to look at something known as the write-ahead log or the WAL file. Now, a write-ahead log is append-only mechanism and really, this was developed to enable the sort of acid transactions. We want to be able to have atomic changes to the database and we want our data to be durable. So it's used for both of those things. But in addition, it can also be used as a source of data for creating read replicas. So let's think about a simple write operation to the database. So we have a client application. Maybe it's going to update a record. There's a new sales on a website, so it's writing some data to the primary. So that data gets sent from the client where the application is running and it's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Transactional vs. analytical queries5m 41s
-
(Locked)
Indexing for transactional queries10m 11s
-
(Locked)
Materialized views for transactional queries3m 51s
-
(Locked)
Using read replicas to improve query performance2m 55s
-
(Locked)
Understanding write-ahead logging5m 6s
-
(Locked)
Denormalizing for analytical queries4m 18s
-
(Locked)
Aggregation and sampling for analytical queries5m 45s
-
(Locked)
Challenge: Optimize a data model for an analytical queries25s
-
(Locked)
Solution: Optimize a data model for an analytical queries35s
-
(Locked)
-