explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XZ2y

Settings
# exclusive inclusive rows x rows loops node
1. 458,024.705 628,447.430 ↑ 2.9 58,110,390 1

Hash Left Join (cost=115.83..7,508,461.09 rows=167,674,650 width=216) (actual time=102,403.687..628,447.430 rows=58,110,390 loops=1)

  • Hash Cond: ((d.demo_group_id = d_1.demo_group_id) AND (audience_map.audience_sk = audience_map_1.audience_sk))
2. 35,999.349 68,411.150 ↑ 2.9 58,110,390 1

Hash Join (cost=50.70..6,250,834.13 rows=167,674,650 width=184) (actual time=376.752..68,411.150 rows=58,110,390 loops=1)

  • Hash Cond: ("*VALUES*".column1 = (audience_map.audience_genesis_name)::text)
3. 14,992.902 32,410.921 ↑ 2.9 58,110,390 1

Nested Loop (cost=0.00..3,945,257.00 rows=167,674,650 width=174) (actual time=375.842..32,410.921 rows=58,110,390 loops=1)

4. 1,027.909 1,027.909 ↑ 2.9 298,002 1

Seq Scan on demo_groups d (cost=0.00..172,577.38 rows=859,870 width=1,218) (actual time=375.793..1,027.909 rows=298,002 loops=1)

  • Filter: ((rate_card_type_code)::text = 'std'::text)
  • Rows Removed by Filter: 561868
5. 16,390.110 16,390.110 ↑ 1.0 195 298,002

Values Scan on "*VALUES*" (cost=0.00..2.44 rows=195 width=64) (actual time=0.000..0.055 rows=195 loops=298,002)

6. 0.053 0.880 ↑ 1.0 195 1

Hash (cost=48.26..48.26 rows=195 width=28) (actual time=0.880..0.880 rows=195 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
7. 0.644 0.827 ↑ 1.0 195 1

HashAggregate (cost=44.36..46.31 rows=195 width=28) (actual time=0.774..0.827 rows=195 loops=1)

  • Group Key: audience_map.audience_sk, audience_map.audience, audience_map.audience_genesis_name
8. 0.183 0.183 ↑ 1.0 1,392 1

Seq Scan on audience_map (cost=0.00..33.92 rows=1,392 width=28) (actual time=0.014..0.183 rows=1,392 loops=1)

9. 25,485.889 102,011.575 ↓ 280,934.0 54,782,130 1

Hash (cost=62.21..62.21 rows=195 width=44) (actual time=102,011.575..102,011.575 rows=54,782,130 loops=1)

  • Buckets: 131072 (originally 1024) Batches: 1024 (originally 1) Memory Usage: 3719kB
10. 15,303.132 76,525.686 ↓ 280,934.0 54,782,130 1

Nested Loop (cost=49.66..62.21 rows=195 width=44) (actual time=1.218..76,525.686 rows=54,782,130 loops=1)

11. 540.810 540.810 ↓ 280,934.0 280,934 1

Index Scan using idx_rate_card_type_code on demo_groups d_1 (cost=0.42..4.44 rows=1 width=1,116) (actual time=0.237..540.810 rows=280,934 loops=1)

  • Index Cond: ((rate_card_type_code)::text = 'acm3'::text)
12. 22,474.720 60,681.744 ↑ 1.0 195 280,934

Hash Join (cost=49.23..55.82 rows=195 width=36) (actual time=0.103..0.216 rows=195 loops=280,934)

  • Hash Cond: ((audience_map_1.audience_genesis_name)::text = "*VALUES*_1".column1)
13. 10,956.251 10,956.426 ↑ 1.0 195 280,934

HashAggregate (cost=44.36..46.31 rows=195 width=28) (actual time=0.001..0.039 rows=195 loops=280,934)

  • Group Key: audience_map_1.audience_sk, audience_map_1.audience, audience_map_1.audience_genesis_name
14. 0.175 0.175 ↑ 1.0 1,392 1

Seq Scan on audience_map audience_map_1 (cost=0.00..33.92 rows=1,392 width=28) (actual time=0.004..0.175 rows=1,392 loops=1)

15. 12,080.162 27,250.598 ↑ 1.0 195 280,934

Hash (cost=2.44..2.44 rows=195 width=64) (actual time=0.097..0.097 rows=195 loops=280,934)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
16. 15,170.436 15,170.436 ↑ 1.0 195 280,934

Values Scan on "*VALUES*_1" (cost=0.00..2.44 rows=195 width=64) (actual time=0.001..0.054 rows=195 loops=280,934)