explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Abeh

Settings
# exclusive inclusive rows x rows loops node
1. 4.898 46.827 ↑ 1.0 3,143 1

Seq Scan on comment_like cl1 (cost=0.00..71,014.98 rows=3,169 width=86) (actual time=1.712..46.827 rows=3,143 loops=1)

2.          

SubPlan (for Seq Scan)

3. 6.286 40.859 ↑ 1.0 1 3,143

Aggregate (cost=14.07..14.08 rows=1 width=0) (actual time=0.012..0.013 rows=1 loops=3,143)

4. 12.572 34.573 ↑ 1.0 3 3,143

Bitmap Heap Scan on comment_like cl2 (cost=4.30..14.07 rows=3 width=0) (actual time=0.008..0.011 rows=3 loops=3,143)

  • Recheck Cond: ((cl1.object_id)::text = (object_id)::text)
  • Heap Blocks: exact=9,293
5. 22.001 22.001 ↑ 1.0 3 3,143

Bitmap Index Scan on idx_comment_like_tbl_comment_id_user_id (cost=0.00..4.30 rows=3 width=0) (actual time=0.007..0.007 rows=3 loops=3,143)

  • Index Cond: ((cl1.object_id)::text = (object_id)::text)
6. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_comment_like_tbl_comment_id_user_id on comment_like cl3 (cost=0.28..8.30 rows=1 width=0) (never executed)

  • Index Cond: ((object_id = (cl1.object_id)::text) AND (user_id = 'ab08b5cc-8dfb-11e9-956e-024287718f03'::text))
  • Heap Fetches: 0
7. 1.070 1.070 ↑ 1.0 999 1

Seq Scan on comment_like cl3_1 (cost=0.00..86.61 rows=1,021 width=37) (actual time=0.007..1.070 rows=999 loops=1)

  • Filter: ((user_id)::text = 'ab08b5cc-8dfb-11e9-956e-024287718f03'::text)
  • Rows Removed by Filter: 2,144
Planning time : 0.285 ms
Execution time : 47.165 ms