explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XXD9 : Optimization for: Optimization for: plan #ZJaI; plan #2bdn

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.020 7,770.091 ↓ 0.0 0 1

Nested Loop (cost=58,349.58..66,424.77 rows=1 width=36) (actual time=7,770.081..7,770.091 rows=0 loops=1)

2. 0.000 7,770.071 ↓ 0.0 0 1

Nested Loop (cost=58,349.30..66,424.47 rows=1 width=45) (actual time=7,770.060..7,770.071 rows=0 loops=1)

3. 87.419 7,787.540 ↓ 0.0 0 1

Gather (cost=58,348.87..66,421.54 rows=1 width=57) (actual time=7,770.027..7,787.540 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 3,324.167 7,700.121 ↓ 0.0 0 3 / 3

Parallel Hash Join (cost=57,348.87..65,421.44 rows=1 width=57) (actual time=7,700.111..7,700.121 rows=0 loops=3)

  • Hash Cond: ((pb.client_id = pp.id) AND (pb.id = pp.blog_id))
5. 3,554.415 3,554.415 ↑ 1.2 120,528 3 / 3

Parallel Seq Scan on post_blog pb (cost=0.00..7,281.60 rows=150,660 width=17) (actual time=12.611..3,554.415 rows=120,528 loops=3)

6. 299.107 821.539 ↑ 1.2 9,422 3 / 3

Parallel Hash (cost=57,175.65..57,175.65 rows=11,548 width=48) (actual time=821.529..821.539 rows=9,422 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 2560kB
7. 515.049 522.432 ↑ 1.2 9,422 3 / 3

Parallel Bitmap Heap Scan on post_post pp (cost=270.79..57,175.65 rows=11,548 width=48) (actual time=10.762..522.432 rows=9,422 loops=3)

  • Recheck Cond: (client_id = 2)
  • Heap Blocks: exact=3920
8. 7.383 7.383 ↓ 1.0 28,267 1 / 3

Bitmap Index Scan on post_post_client__11a3d3_gin (cost=0.00..263.86 rows=27,715 width=0) (actual time=22.140..22.149 rows=28,267 loops=1)

  • Index Cond: (client_id = 2)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using post_author_pkey on post_author pa (cost=0.42..2.92 rows=1 width=8) (never executed)

  • Index Cond: (id = pp.author_id)
  • Filter: (pp.id = client_id)
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using reference_host_url_4f98804f_like on reference_host rh (cost=0.28..0.30 rows=1 width=22) (never executed)

  • Index Cond: (url = (pb.host_id)::text)
  • Heap Fetches: 0
Planning time : 80.132 ms
Execution time : 7,788.958 ms