explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lYnm

Settings
# exclusive inclusive rows x rows loops node
1. 0.656 474,585.668 ↓ 117.0 117 1

Result (cost=32,924.60..32,924.91 rows=1 width=166) (actual time=474,585.239..474,585.668 rows=117 loops=1)

2. 1.269 474,585.012 ↓ 117.0 117 1

Sort (cost=32,924.60..32,924.60 rows=1 width=162) (actual time=474,585.007..474,585.012 rows=117 loops=1)

  • Sort Key: jk.gnr, jk.bnr, jk.fnr, jk.teig_nr
  • Sort Method: quicksort Memory: 41kB
3. 3.511 474,583.743 ↓ 117.0 117 1

Nested Loop Anti Join (cost=21.02..32,924.59 rows=1 width=162) (actual time=5,126.208..474,583.743 rows=117 loops=1)

4. 2.019 15.596 ↓ 117.0 117 1

Nested Loop (cost=18.45..21.08 rows=1 width=110) (actual time=3.064..15.596 rows=117 loops=1)

5. 1.564 12.290 ↓ 117.0 117 1

Nested Loop (cost=18.18..20.28 rows=1 width=104) (actual time=3.050..12.290 rows=117 loops=1)

6. 3.511 7.546 ↓ 60.0 60 1

GroupAggregate (cost=17.90..17.96 rows=1 width=54) (actual time=3.036..7.546 rows=60 loops=1)

  • Group Key: jk_1.municipality_nr, jk_1.gnr, jk_1.bnr, jk_1.fnr
  • Filter: ((((sum(jk_1.t1) + sum(jk_1.t2)) + sum(jk_1.t3)) > '5'::double precision) OR (((sum((jk_1.t4 + jk_1.t5)) + sum(jk_1.t6)) + sum(jk_1.t7)) > '25'::double precision))
  • Rows Removed by Filter: 4039
7. 2.506 4.035 ↓ 4,619.0 4,619 1

Sort (cost=17.90..17.90 rows=1 width=38) (actual time=3.019..4.035 rows=4,619 loops=1)

  • Sort Key: jk_1.gnr, jk_1.bnr, jk_1.fnr
  • Sort Method: quicksort Memory: 553kB
8. 1.254 1.529 ↓ 4,619.0 4,619 1

Bitmap Heap Scan on sl_lop_temp_jordreg_rep4_ar5_areal jk_1 (cost=1.47..17.89 rows=1 width=38) (actual time=0.341..1.529 rows=4,619 loops=1)

  • Recheck Cond: (municipality_nr = 2004)
  • Filter: ((farm_gnr IS NULL) AND ((ownership)::text = ANY ('{M,F}'::text[])) AND (gnr <> 0) AND (bnr <> 0))
  • Rows Removed by Filter: 348
  • Heap Blocks: exact=72
9. 0.275 0.275 ↓ 198.7 4,967 1

Bitmap Index Scan on sl_lop_temp_jordreg_rep4_ar5_ar_municipality_nr_gnr_bnr_fnr_idx (cost=0.00..1.47 rows=25 width=0) (actual time=0.275..0.275 rows=4,967 loops=1)

  • Index Cond: (municipality_nr = 2004)
10. 3.180 3.180 ↓ 2.0 2 60

Index Scan using sl_lop_temp_jordreg_rep4_ar5_ar_municipality_nr_gnr_bnr_fnr_idx on sl_lop_temp_jordreg_rep4_ar5_areal jk (cost=0.28..2.31 rows=1 width=102) (actual time=0.031..0.053 rows=2 loops=60)

  • Index Cond: ((municipality_nr = jk_1.municipality_nr) AND (gnr = jk_1.gnr) AND (bnr = jk_1.bnr) AND (fnr = jk_1.fnr))
11. 1.287 1.287 ↑ 1.0 1 117

Index Scan using kode_felles_kommune_unique_komid on felles_kommune fk (cost=0.27..0.79 rows=1 width=12) (actual time=0.011..0.011 rows=1 loops=117)

  • Index Cond: (komid = jk.municipality_nr)
12. 4.446 474,564.636 ↓ 0.0 0 117

Nested Loop (cost=2.56..32,903.45 rows=1 width=8) (actual time=4,056.108..4,056.108 rows=0 loops=117)

13. 4.914 474,537.024 ↓ 198.0 198 117

Nested Loop (cost=2.14..32,901.69 rows=1 width=18) (actual time=3,403.678..4,055.872 rows=198 loops=117)

14. 68,183.958 474,522.633 ↓ 3.0 3 117

Nested Loop (cost=1.72..32,853.64 rows=1 width=14) (actual time=3,403.646..4,055.749 rows=3 loops=117)

  • Join Filter: ((pp.parcel_id)::text = (pp2.parcel_id)::text)
  • Rows Removed by Join Filter: 2401469
15. 64,393.092 252,281.835 ↓ 1,316,725.0 1,316,725 117

Nested Loop (cost=1.29..32,852.11 rows=1 width=27) (actual time=0.426..2,156.255 rows=1,316,725 loops=117)

16. 14,775.438 57,771.441 ↓ 1,112,114.0 1,112,114 117

Nested Loop (cost=0.86..32,849.46 rows=1 width=22) (actual time=0.422..493.773 rows=1,112,114 loops=117)

17. 5,920.083 5,920.083 ↓ 273.0 273 117

Index Scan using property_municipality_nr_gnr_bnr_fnr_key on property p2 (cost=0.43..32,798.81 rows=1 width=10) (actual time=0.414..50.599 rows=273 loops=117)

  • Index Cond: ((jk.gnr = gnr) AND (jk.bnr = bnr))
18. 37,075.920 37,075.920 ↓ 1,357.0 4,071 31,962

Index Scan using property_municipality_nr_gnr_bnr_fnr_key on property p (cost=0.43..50.62 rows=3 width=12) (actual time=0.005..1.160 rows=4,071 loops=31,962)

  • Index Cond: ((municipality_nr = 2004) AND (jk.fnr = fnr))
19. 130,117.302 130,117.302 ↑ 4.0 1 130,117,302

Index Scan using idx_org_property_property_parcel_property_ref on property_parcel pp (cost=0.43..2.61 rows=4 width=13) (actual time=0.001..0.001 rows=1 loops=130,117,302)

  • Index Cond: (property_ref = p.id)
20. 154,056.840 154,056.840 ↑ 2.0 2 154,056,840

Index Scan using idx_org_property_property_parcel_property_ref on property_parcel pp2 (cost=0.43..1.48 rows=4 width=13) (actual time=0.001..0.001 rows=2 loops=154,056,840)

  • Index Cond: (property_ref = p2.id)
21. 9.477 9.477 ↑ 1.0 66 351

Index Scan using uidx_org_property_property_group_municipality_nr_name on property_group pg (cost=0.42..47.39 rows=66 width=4) (actual time=0.006..0.027 rows=66 loops=351)

  • Index Cond: (municipality_nr = 2004)
22. 23.166 23.166 ↓ 0.0 0 23,166

Index Only Scan using idx_org_property_property_group_property_sub on property_group_property pgp (cost=0.42..1.77 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=23,166)

  • Index Cond: ((property_group_ref = pg.id) AND (gnr = p.gnr) AND (bnr = p.bnr) AND (fnr = p.fnr))
  • Heap Fetches: 0
Planning time : 12.010 ms
Execution time : 474,585.909 ms