объяснение 2 трека

This commit is contained in:
2026-10-25 23:04:14 +03:00
parent d49914a62f
commit 19452af70e
4 changed files with 39 additions and 32 deletions
+6 -6
View File
@@ -1,28 +1,28 @@
{
"hypothesis": "Keyset pagination on (chat_id, created_at, id) avoids large offsets; redundant (chat_id)-only index does not improve reads but slows writes.",
"hot_chat_id": "01aeb3d4-8235-4964-8981-ace0cec560df",
"hot_chat_id": "9d97f9d9-1ad0-4ab6-b95a-f35411c401b6",
"read_plans": {
"keyset_limit_50": {
"node_type": "Index Only Scan",
"index_name": "messages_chat_history_idx",
"execution_ms": 0.061,
"execution_ms": 0.323,
"plan_rows": 50
},
"offset_50000_limit_50": {
"node_type": "Index Only Scan",
"index_name": "messages_chat_history_idx",
"execution_ms": 6.117,
"execution_ms": 5.577,
"plan_rows": 50
},
"keyset_with_extra_chat_id_index": {
"node_type": "Index Only Scan",
"index_name": "messages_chat_history_idx",
"execution_ms": 0.052,
"execution_ms": 0.055,
"plan_rows": 50
}
},
"write_messages_per_second": {
"with_extra_chat_id_index": 23192.1,
"production_indexes_only": 38756.3
"with_extra_chat_id_index": 17808.1,
"production_indexes_only": 22943.3
}
}