forked from mtusi2026/mtusi2026lab3
Add lab 3 scaling research and database bottleneck evidence
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
[
|
||||
{
|
||||
"queryid": -1973204932425384048,
|
||||
"calls": 8410,
|
||||
"total_exec_ms": 9314.903,
|
||||
"mean_exec_ms": 1.108,
|
||||
"rows": 8410,
|
||||
"shared_blks_hit": 207796,
|
||||
"shared_blks_read": 2,
|
||||
"temp_blks_written": 0,
|
||||
"query": "INSERT INTO message_idempotency(user_id, chat_id, idempotency_key, message_id)\nVALUES ($1, $2, $3, $4)\nON CONFLICT (user_id, chat_id, idempotency_key) DO NOTHIN"
|
||||
},
|
||||
{
|
||||
"queryid": -7361367982095387306,
|
||||
"calls": 8477,
|
||||
"total_exec_ms": 8839.377,
|
||||
"mean_exec_ms": 1.043,
|
||||
"rows": 8477,
|
||||
"shared_blks_hit": 104705,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "INSERT INTO messages (chat_id, sender_id, text)\nVALUES ($1, $2, $3)\nRETURNING id, chat_id, sender_id, text, created_at"
|
||||
},
|
||||
{
|
||||
"queryid": 5278999262105563684,
|
||||
"calls": 14702,
|
||||
"total_exec_ms": 2642.073,
|
||||
"mean_exec_ms": 0.18,
|
||||
"rows": 14702,
|
||||
"shared_blks_hit": 58808,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "SELECT c.id, c.title, c.created_at, array_agg(cm.user_id)::uuid[] AS member_ids\nFROM chats c\n JOIN chat_members cm ON cm.chat_id = c.id\nWHERE c.id = $1\n"
|
||||
},
|
||||
{
|
||||
"queryid": 4854991825702068830,
|
||||
"calls": 8623,
|
||||
"total_exec_ms": 107.096,
|
||||
"mean_exec_ms": 0.012,
|
||||
"rows": 0,
|
||||
"shared_blks_hit": 0,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "begin"
|
||||
},
|
||||
{
|
||||
"queryid": 7421764486656699138,
|
||||
"calls": 8,
|
||||
"total_exec_ms": 81.627,
|
||||
"mean_exec_ms": 10.203,
|
||||
"rows": 8,
|
||||
"shared_blks_hit": 8,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "SELECT json_build_object($1, count(*), $2, count(*) FILTER (WHERE state=$3), $4, count(*) FILTER (WHERE wait_event_type=$5), $6, count(*) FILTER (WHERE wait_eve"
|
||||
},
|
||||
{
|
||||
"queryid": -6556208730317240597,
|
||||
"calls": 2,
|
||||
"total_exec_ms": 36.335,
|
||||
"mean_exec_ms": 18.167,
|
||||
"rows": 2,
|
||||
"shared_blks_hit": 2648,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "SELECT count(*) FROM messages"
|
||||
},
|
||||
{
|
||||
"queryid": 6097083398544187049,
|
||||
"calls": 8383,
|
||||
"total_exec_ms": 5.073,
|
||||
"mean_exec_ms": 0.001,
|
||||
"rows": 0,
|
||||
"shared_blks_hit": 0,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "commit"
|
||||
},
|
||||
{
|
||||
"queryid": -7614253921970556595,
|
||||
"calls": 2,
|
||||
"total_exec_ms": 0.636,
|
||||
"mean_exec_ms": 0.318,
|
||||
"rows": 2,
|
||||
"shared_blks_hit": 0,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "SELECT coalesce(json_agg(row_to_json(i)), $1::json) FROM pg_stat_io i WHERE object=$2"
|
||||
},
|
||||
{
|
||||
"queryid": -1241709283587570954,
|
||||
"calls": 1,
|
||||
"total_exec_ms": 0.208,
|
||||
"mean_exec_ms": 0.208,
|
||||
"rows": 1,
|
||||
"shared_blks_hit": 0,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "SELECT pg_stat_statements_reset()"
|
||||
},
|
||||
{
|
||||
"queryid": -7999966296315164249,
|
||||
"calls": 2,
|
||||
"total_exec_ms": 0.119,
|
||||
"mean_exec_ms": 0.06,
|
||||
"rows": 2,
|
||||
"shared_blks_hit": 0,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "SELECT row_to_json(w) FROM pg_stat_wal w"
|
||||
},
|
||||
{
|
||||
"queryid": 4670030308230031587,
|
||||
"calls": 2,
|
||||
"total_exec_ms": 0.074,
|
||||
"mean_exec_ms": 0.037,
|
||||
"rows": 2,
|
||||
"shared_blks_hit": 0,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "SELECT json_build_object($1,current_setting($2),$3,current_setting($4),$5,current_setting($6),$7,current_setting($8))"
|
||||
},
|
||||
{
|
||||
"queryid": -7676915344437841334,
|
||||
"calls": 14,
|
||||
"total_exec_ms": 0.011,
|
||||
"mean_exec_ms": 0.001,
|
||||
"rows": 0,
|
||||
"shared_blks_hit": 0,
|
||||
"shared_blks_read": 0,
|
||||
"temp_blks_written": 0,
|
||||
"query": "rollback"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user