dpc on Nostr: Some databases have ways to block non-indexed queries. I generally think it's a ...
Some databases have ways to block non-indexed queries.
https://www.mongodb.com/docs/manual/reference/parameters/#param.notablescanI generally think it's a mistake for SQL (and similar) to have a default query auto-planner. I would rather write something like 'take this index, filter for this, pick these fields, then join,..." - basically specifying the query plan myself. Too many times I got bitten by the planner using the wrong index. It's difficult to figure out & prevent, and sometimes query planner changes its mind for some runtime reasons (obviously always in production at 2am ).
Published at
2023-03-09 17:54:43Event JSON
{
"id": "f282e1d628eff90624b0236f1b11dc765a871c465abb2b0f847102252ff3114f",
"pubkey": "274611b4728b0c40be1cf180d8f3427d7d3eebc55645d869a002e8b657f8cd61",
"created_at": 1678384483,
"kind": 1,
"tags": [
[
"e",
"407a0f2bcb8e5147341a4386a8a3ce964d495b0e45621ea894b18384e9611488",
"",
"root"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"t",
"param"
]
],
"content": "Some databases have ways to block non-indexed queries. https://www.mongodb.com/docs/manual/reference/parameters/#param.notablescan\n\nI generally think it's a mistake for SQL (and similar) to have a default query auto-planner. I would rather write something like 'take this index, filter for this, pick these fields, then join,...\" - basically specifying the query plan myself. Too many times I got bitten by the planner using the wrong index. It's difficult to figure out \u0026 prevent, and sometimes query planner changes its mind for some runtime reasons (obviously always in production at 2am ).",
"sig": "530f9120875aab9a95abf126c3788907bb85c97557db603fb5622d29c8a3049257a29ec82f0876f3b60d56e26e0fd5395cce05e6f04f753e26dda7368369338f"
}