3 ms·
A unique index in Postgres is an efficient set data structure. A sorted set is a index in Postgres, stored as a B-Tree. Postgres has hash indexes, basically t
by etaioinshrdlu 9y ago
A unique index in Postgres is an efficient set data structure.
A sorted set is a index in Postgres, stored as a B-Tree.
Postgres has hash indexes, basically the same as a hash table.
And you can run Postgres in memory if you want via tmpfs.
Bitmaps and hyperloglogs are basically math functions running in the database, and Postgres supports user-defined math functions. It seems disingenuous to point out individual math functions when both databases support arbitrary user defined math functions.
- matthewmacleod 9y agoYou are conflating structures used internally to implement a relational database, and structures exposed as a first-class building block for your own systems. Think of Redis a a shared, in-memory, well-tested implementation of basic data structure primitives that takes care of a lot of the fiddly nonsense around them without you having to do the work. Postgres is awesome, but it's targeted at a different use case and has different characteristics; it's overkill for something like a shared key-value store, for example.