hobbies: coding, art, books, japanese
This does make me wonder how a similar migration would look like in Postgres.
They use heap files so their primary and secondary index should be equally fast... But do heap files imply that even our initial naive approach would work just fine?
This does make me wonder how a similar migration would look like in Postgres.
They use heap files so their primary and secondary index should be equally fast... But do heap files imply that even our initial naive approach would work just fine?
We queried the rows to get a list of all affected primary keys first, and then we ran the UPDATE query over this list.
We queried the rows to get a list of all affected primary keys first, and then we ran the UPDATE query over this list.
age=22 → primary_key=101
age=29 → primary_key=103
age=35 → primary_key=120
So filtering by secondary index still requires about O(k log n)
age=22 → primary_key=101
age=29 → primary_key=103
age=35 → primary_key=120
So filtering by secondary index still requires about O(k log n)
In an IOT, the primary index (B-Tree) also stores the data. So any operation on primary key requires only a single B-tree lookup.
In an IOT, the primary index (B-Tree) also stores the data. So any operation on primary key requires only a single B-tree lookup.
age=22 → primary_key=101
age=29 → primary_key=103
age=35 → primary_key=120
age=22 → primary_key=101
age=29 → primary_key=103
age=35 → primary_key=120