explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8mE9

Settings
# exclusive inclusive rows x rows loops node
1. 45.128 1,976.191 ↑ 24.3 24,995 1

Unique (cost=1,636,427.22..1,640,990.31 rows=608,412 width=16) (actual time=1,864.313..1,976.191 rows=24,995 loops=1)

  • Functions: 67
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 4.059 ms, Inlining 62.132 ms, Optimization 247.041 ms, Emission 170.341 ms, Total 483.573 ms
2. 201.336 1,931.063 ↓ 1.0 610,736 1

Sort (cost=1,636,427.22..1,637,948.25 rows=608,412 width=16) (actual time=1,864.312..1,931.063 rows=610,736 loops=1)

  • Sort Key: outfit_comment.id_outfit, rel_outfit_comment_hashtag.id_hashtag
  • Sort Method: external merge Disk: 15576kB
3. 10.741 1,729.727 ↓ 1.0 610,736 1

Gather (cost=10,290.27..1,567,576.49 rows=608,412 width=16) (actual time=211.773..1,729.727 rows=610,736 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 17.140 1,718.986 ↑ 3.0 203,579 3 / 3

Parallel Append (cost=9,290.27..1,505,735.29 rows=608,412 width=16) (actual time=419.761..1,718.986 rows=203,579 loops=3)

5. 21.879 303.070 ↓ 2.4 113,346 1 / 3

Parallel Hash Join (cost=16,824.45..263,304.05 rows=46,962 width=16) (actual time=864.649..909.210 rows=113,346 loops=1)

  • Hash Cond: (rel_outfit_comment_hashtag.id_outfit_comment = outfit_comment.id_outfit_comment)
6. 190.246 195.009 ↓ 2.4 113,346 1 / 3

Parallel Bitmap Heap Scan on rel_outfit_comment_hashtag (cost=2,114.06..247,418.38 rows=46,962 width=16) (actual time=22.071..585.028 rows=113,346 loops=1)

  • Recheck Cond: (id_hashtag = 21)
  • Rows Removed by Index Recheck: 3944675
  • Filter: (deleted_at IS NULL)
7. 4.763 4.763 ↓ 1.0 113,346 1 / 3

Bitmap Index Scan on rel_outfit_comment_hashtag_id_hashtag_idx (cost=0.00..2,085.88 rows=112,709 width=0) (actual time=14.290..14.290 rows=113,346 loops=1)

  • Index Cond: (id_hashtag = 21)
8. 14.077 86.182 ↓ 2.4 290,815 1 / 3

Parallel Hash (cost=12,603.73..12,603.73 rows=121,173 width=16) (actual time=258.546..258.546 rows=290,815 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 2752kB
9. 72.105 72.105 ↓ 2.4 290,815 1 / 3

Parallel Seq Scan on outfit_comment (cost=0.00..12,603.73 rows=121,173 width=16) (actual time=165.162..216.315 rows=290,815 loops=1)

  • Filter: (deleted_at IS NULL)
10. 1,380.399 1,398.776 ↑ 1.2 165,797 3 / 3

Parallel Bitmap Heap Scan on rel_outfit_hashtag (cost=9,290.27..1,233,305.06 rows=206,543 width=16) (actual time=131.558..1,398.776 rows=165,797 loops=3)

  • Recheck Cond: (id_hashtag = 21)
  • Rows Removed by Index Recheck: 13084467
  • Filter: (deleted_at IS NULL)
  • Heap Blocks: exact=12415 lossy=123894
11. 18.377 18.377 ↓ 1.0 497,390 1 / 3

Bitmap Index Scan on rel_outfit_hashtag_id_hashtag_idx (cost=0.00..9,166.34 rows=495,703 width=0) (actual time=55.130..55.130 rows=497,390 loops=1)

  • Index Cond: (id_hashtag = 21)
Planning time : 0.240 ms
Execution time : 1,984.069 ms