, , , , ,

Efficient storage of large IDs in Postgres

Imagine a system that uses large-ish hex string identifiers, e.g. similar to UUIDs. To make the math easy, lets say we make a table with a million have 20 character IDs: CREATE TABLE ids1 (id CHARACTER VARYING(20));   — takes 2091 ms INSERT INTO ids1 SELECT ‘0123456789ABCDEF0123’ FROM generate_series(1, 1000000) num We can get the […]