VitorPamplona on Nostr: Nostr Database strategies: 1. Build indexes for every possible combination of ...
Nostr Database strategies:
1. Build indexes for every possible combination of filters: It's fast, but needs a ton (GBs) of memory and 10x your database size in disk. Works great for servers.
2. Don't index all tags: Some filters just won't work and it won't find stuff, but it is fast and memory/disk efficient. Works great for small apps that have known filter needs.
3. Delete events as soon as the app doesn't need them anymore: It's fast and memory/disk efficient, but search sucks and figuring out what can be deleted is a major hassle.
Did I miss anything?
Published at
2025-12-31 13:34:58 UTCEvent JSON
{
"id": "ac1af2b5483be906574d891b05bef2448100a26dd046dcd3f9aefe41b2778238",
"pubkey": "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c",
"created_at": 1767188098,
"kind": 1,
"tags": [
[
"client",
"nosotros",
"31990:c6603b0f1ccfec625d9c08b753e4f774eaf7d1cf2769223125b5fd4da728019e:1728437063755"
]
],
"content": "Nostr Database strategies: \n\n1. Build indexes for every possible combination of filters: It's fast, but needs a ton (GBs) of memory and 10x your database size in disk. Works great for servers.\n\n2. Don't index all tags: Some filters just won't work and it won't find stuff, but it is fast and memory/disk efficient. Works great for small apps that have known filter needs.\n\n3. Delete events as soon as the app doesn't need them anymore: It's fast and memory/disk efficient, but search sucks and figuring out what can be deleted is a major hassle.\n\nDid I miss anything? ",
"sig": "6e77a7d26bf676d5bee3805a3bfb41078db114ed71389f3bd6696dfc4b3c589baf5006eca4643042acebf55a1d48aa334222c33ae0d74dc0aedf32f4bdd544af"
}