david on Nostr: If you can do a single sql query for the entire thread, using the id of the top level ...
If you can do a single sql query for the entire thread, using the id of the top level event in the query, that would be much faster than needing multiple queries per thread. And I suppose it would be straightforward enough to have a parentEventId column in the table for kind 1 events.
Published at
2024-11-26 23:15:51Event JSON
{
"id": "574c55f18891454ad32776e34697d972438d119c9bff1db6581f47b100c54671",
"pubkey": "e5272de914bd301755c439b88e6959a43c9d2664831f093c51e9c799a16a102f",
"created_at": 1732662951,
"kind": 1,
"tags": [
[
"e",
"dfad86f303bdbe7af12c7291518a8efe20aac16574ce511184afba43e2cb66a4",
"nostr-idb://cache-relay",
"root"
],
[
"e",
"a4d85b8a4551c345361af6cbff5978053397538822e9eea7e14846d2a209c5b5",
"",
"reply"
],
[
"p",
"7cc328a08ddb2afdf9f9be77beff4c83489ff979721827d628a542f32a247c0e"
],
[
"p",
"0aa39e5aef99a000a7bdb0b499158c92bc4aa20fb65931a52d055b5eb6dff738"
]
],
"content": "If you can do a single sql query for the entire thread, using the id of the top level event in the query, that would be much faster than needing multiple queries per thread. And I suppose it would be straightforward enough to have a parentEventId column in the table for kind 1 events.",
"sig": "7ee112e89047d660774d33dda35b14cf1b5ba1b2a53a585af213a27704ef67af43adb37ff31befce4326b9141dee066156e22d1a00696adff291bbb8ca6932f5"
}