Slide 33
Slide 33 text
Explainจ
EXPLAIN (ANALYZE, BUFFERS)
SELECT *
FROM companies JOIN reviews ON (companies.id = reviews.company_id)
WHERE companies.created_at < '2019-01-30 22:10:00';
-------------------------------------------------------
Nested Loop (cost=0.28..145.39 rows=24 width=1387)
(actual time=1.049..1.095 rows=24 loops=1)
Buffers: shared hit=72 read=2
-> Seq Scan on reviews (cost=0.00..2.24 rows=24 width=558)
(actual time=0.008..0.012 rows=24 loops=1)
Buffers: shared hit=2
-> Index Scan using c_pkey on companies (cost=0.28..5.96 rows=1 width=829)
(actual time=0.044..0.044 rows=1 loops=24)
Index Cond: (id = reviews.company_id)
Filter: (created_at < '2019-01-30 22:10:00+00'::timestamp with time zone)
Buffers: shared hit=70 read=2
Planning time: 0.152 ms
Execution time: 1.125 ms
33