forked from mtusi2026/mtusi2026lab2
8 lines
214 B
SQL
8 lines
214 B
SQL
-- run inside postgres after loading >=10000 synthetic messages
|
|
EXPLAIN (ANALYZE, BUFFERS)
|
|
SELECT id, chat_id, sender_id, text, created_at
|
|
FROM messages
|
|
WHERE chat_id = :'chat_id'
|
|
ORDER BY created_at, id
|
|
LIMIT 50;
|