explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mgaf

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 62,284.888 ↓ 12,689.0 25,378 1

Hash Right Join (cost=51,038.82..51,052.61 rows=2 width=28) (actual time=62,275.494..62,284.888 rows=25,378 loops=1)

  • Hash Cond: (rf_kpi.zo_id = cz.zo_id)
2.          

Initplan (for Hash Right Join)

3. 0.075 0.075 ↑ 1.0 1 1

Seq Scan on rtki (cost=0.00..8.14 rows=1 width=103) (actual time=0.058..0.075 rows=1 loops=1)

  • Filter: (name ~~* 'Theoretical marketshare'::text)
  • Rows Removed by Filter: 78
4. 134.691 305.667 ↑ 1.0 1 1

Aggregate (cost=25,506.84..25,506.85 rows=1 width=32) (actual time=305.658..305.667 rows=1 loops=1)

5. 41.972 170.976 ↓ 615,035.0 1,230,070 1

Append (cost=0.00..25,506.83 rows=2 width=4) (actual time=0.014..170.976 rows=1,230,070 loops=1)

6. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on rtsepezocoav rtsepezocoav_1 (cost=0.00..0.00 rows=1 width=4) (actual time=0.002..0.010 rows=0 loops=1)

  • Filter: ((pe_id = 65) AND (se_id = 1) AND (ad_id = 26))
7. 128.994 128.994 ↓ 1,230,070.0 1,230,070 1

Seq Scan on rtsepezocoav_1_65_26 rtsepezocoav_1_65_26_1 (cost=0.00..25,506.83 rows=1 width=4) (actual time=0.011..128.994 rows=1,230,070 loops=1)

  • Filter: ((pe_id = 65) AND (se_id = 1) AND (ad_id = 26))
8. 61,824.599 61,824.599 ↓ 25.4 25,373 1

Function Scan on rf_kpi (cost=0.28..10.28 rows=1,000 width=12) (actual time=61,823.325..61,824.599 rows=25,373 loops=1)

9. 2.772 452.160 ↓ 12,689.0 25,378 1

Hash (cost=25,523.53..25,523.53 rows=2 width=12) (actual time=452.148..452.160 rows=25,378 loops=1)

  • Buckets: 32,768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1,446kB
10. 2.983 449.388 ↓ 12,689.0 25,378 1

Nested Loop (cost=25,507.14..25,523.53 rows=2 width=12) (actual time=334.397..449.388 rows=25,378 loops=1)

11. 46.286 421.027 ↓ 12,689.0 25,378 1

Unique (cost=25,506.84..25,506.85 rows=2 width=4) (actual time=334.377..421.027 rows=25,378 loops=1)

12. 186.760 374.741 ↓ 615,035.0 1,230,070 1

Sort (cost=25,506.84..25,506.85 rows=2 width=4) (actual time=334.369..374.741 rows=1,230,070 loops=1)

  • Sort Key: rtsepezocoav.zo_id
  • Sort Method: quicksort Memory: 106,812kB
13. 40.733 187.981 ↓ 615,035.0 1,230,070 1

Append (cost=0.00..25,506.83 rows=2 width=4) (actual time=0.012..187.981 rows=1,230,070 loops=1)

14. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on rtsepezocoav (cost=0.00..0.00 rows=1 width=4) (actual time=0.002..0.010 rows=0 loops=1)

  • Filter: ((pe_id = 65) AND (se_id = 1) AND (ad_id = 26))
15. 147.238 147.238 ↓ 1,230,070.0 1,230,070 1

Seq Scan on rtsepezocoav_1_65_26 (cost=0.00..25,506.83 rows=1 width=4) (actual time=0.009..147.238 rows=1,230,070 loops=1)

  • Filter: ((pe_id = 65) AND (se_id = 1) AND (ad_id = 26))
16. 25.378 25.378 ↑ 1.0 1 25,378

Index Scan using idx_calc_zones_sepezo on calc_zones cz (cost=0.29..8.32 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=25,378)

  • Index Cond: ((zo_id = rtsepezocoav.zo_id) AND (pe_id = 424) AND (se_id = 1))
  • Filter: (ct_id = 1)