explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HqWT

Settings
# exclusive inclusive rows x rows loops node
1. 12,716.962 14,781.320 ↑ 1.2 408,751 1

GroupAggregate (cost=261,590.10..1,597,875.88 rows=475,970 width=137) (actual time=1,778.907..14,781.320 rows=408,751 loops=1)

  • Group Key: clip.id, account.first_name, account.last_name, reel.title, board_ancestor.ancestor_id
2. 1,041.768 2,064.358 ↑ 1.1 418,812 1

Sort (cost=261,590.10..262,780.03 rows=475,970 width=321) (actual time=1,778.197..2,064.358 rows=418,812 loops=1)

  • Sort Key: clip.id, account.first_name, account.last_name, reel.title, board_ancestor.ancestor_id
  • Sort Method: external merge Disk: 60256kB
3. 181.280 1,022.590 ↑ 1.1 418,812 1

Hash Left Join (cost=54,331.73..73,540.92 rows=475,970 width=321) (actual time=521.829..1,022.590 rows=418,812 loops=1)

  • Hash Cond: (reel_clip.reel_id = board_ancestor.id)
4. 83.895 794.825 ↓ 1.3 136,934 1

Hash Join (cost=52,362.21..63,042.44 rows=107,693 width=307) (actual time=475.071..794.825 rows=136,934 loops=1)

  • Hash Cond: (clip.account_id = account.id)
5. 195.890 710.441 ↓ 1.3 136,934 1

Hash Right Join (cost=52,332.75..61,532.21 rows=107,693 width=312) (actual time=474.565..710.441 rows=136,934 loops=1)

  • Hash Cond: (reel_clip.clip_id = clip.id)
6. 40.189 40.189 ↓ 1.1 125,284 1

Seq Scan on reel_clip (cost=0.00..2,519.47 rows=115,147 width=32) (actual time=0.023..40.189 rows=125,284 loops=1)

7. 76.889 474.362 ↓ 1.2 131,406 1

Hash (cost=46,779.59..46,779.59 rows=107,693 width=296) (actual time=474.362..474.362 rows=131,406 loops=1)

  • Buckets: 16384 Batches: 16 Memory Usage: 1513kB
8. 73.005 397.473 ↓ 1.2 131,406 1

Hash Right Join (cost=41,649.05..46,779.59 rows=107,693 width=296) (actual time=314.373..397.473 rows=131,406 loops=1)

  • Hash Cond: (clip_tag.clip_id = clip.id)
9. 6.704 11.287 ↓ 1.0 11,152 1

Hash Left Join (cost=80.71..868.43 rows=11,146 width=26) (actual time=1.001..11.287 rows=11,152 loops=1)

  • Hash Cond: (clip_tag.tag_id = tag.id)
10. 3.627 3.627 ↓ 1.0 11,152 1

Seq Scan on clip_tag (cost=0.00..634.46 rows=11,146 width=32) (actual time=0.010..3.627 rows=11,152 loops=1)

11. 0.457 0.956 ↑ 1.0 1,270 1

Hash (cost=64.76..64.76 rows=1,276 width=26) (actual time=0.955..0.956 rows=1,270 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 88kB
12. 0.499 0.499 ↑ 1.0 1,270 1

Seq Scan on tag (cost=0.00..64.76 rows=1,276 width=26) (actual time=0.008..0.499 rows=1,270 loops=1)

13. 82.308 313.181 ↓ 1.2 127,858 1

Hash (cost=36,120.18..36,120.18 rows=107,693 width=286) (actual time=313.181..313.181 rows=127,858 loops=1)

  • Buckets: 16384 Batches: 16 Memory Usage: 1454kB
14. 230.873 230.873 ↓ 1.2 127,858 1

Seq Scan on clip (cost=0.00..36,120.18 rows=107,693 width=286) (actual time=0.028..230.873 rows=127,858 loops=1)

  • Filter: (visible AND (NOT inactive) AND (status <> 'created'::text))
  • Rows Removed by Filter: 226715
15. 0.246 0.489 ↑ 1.0 687 1

Hash (cost=20.87..20.87 rows=687 width=27) (actual time=0.489..0.489 rows=687 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 49kB
16. 0.243 0.243 ↑ 1.0 687 1

Seq Scan on account (cost=0.00..20.87 rows=687 width=27) (actual time=0.008..0.243 rows=687 loops=1)

17. 12.827 46.485 ↑ 1.0 32,634 1

Hash (cost=1,558.59..1,558.59 rows=32,874 width=46) (actual time=46.485..46.485 rows=32,634 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2996kB
18. 20.496 33.658 ↑ 1.0 32,634 1

Hash Left Join (cost=441.84..1,558.59 rows=32,874 width=46) (actual time=5.371..33.658 rows=32,634 loops=1)

  • Hash Cond: (board_ancestor.ancestor_id = reel.id)
19. 7.819 7.819 ↑ 1.0 32,634 1

Seq Scan on board_ancestor (cost=0.00..664.74 rows=32,874 width=32) (actual time=0.010..7.819 rows=32,634 loops=1)

20. 2.664 5.343 ↓ 1.0 7,424 1

Hash (cost=349.15..349.15 rows=7,415 width=30) (actual time=5.343..5.343 rows=7,424 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 515kB
21. 2.679 2.679 ↓ 1.0 7,424 1

Seq Scan on reel (cost=0.00..349.15 rows=7,415 width=30) (actual time=0.005..2.679 rows=7,424 loops=1)

Planning time : 2.880 ms