Lab2 grade 4: PostgreSQL, Redis sessions, Compose, student tests and evidence.
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
-- Seed ≥10k messages then EXPLAIN the keyset history query.
|
||||
-- Run: docker compose exec -T postgres psql -U messenger -d messenger -f - < evidence/explain.sql
|
||||
|
||||
EXPLAIN (ANALYZE, BUFFERS)
|
||||
SELECT id, chat_id, sender_id, text, created_at
|
||||
FROM messages
|
||||
WHERE chat_id = (SELECT id FROM chats LIMIT 1)
|
||||
AND (created_at, id) > ('1970-01-01'::timestamptz, '00000000-0000-0000-0000-000000000000'::uuid)
|
||||
ORDER BY created_at ASC, id ASC
|
||||
LIMIT 50;
|
||||
Reference in New Issue
Block a user