explain.depesz.com

PostgreSQL's explain analyze made readable

Result: epIkF : Optimization for: Test query; plan #m8ip

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.177 2.156 ↑ 1.0 1 1

Aggregate (cost=806.89..806.90 rows=1 width=32) (actual time=2.156..2.156 rows=1 loops=1)

2.          

CTE network_by_settlement

3. 1.006 1.006 ↓ 28.0 28 1

Index Scan using pk_halozat_telepules on halozat_telepules (cost=0.29..772.85 rows=1 width=4) (actual time=0.038..1.006 rows=28 loops=1)

  • Index Cond: (telepules = 3,336)
  • Filter: (erintett_metszeni AND (upper(ervenyes) IS NULL))
  • Rows Removed by Filter: 7
4.          

CTE services

5. 0.071 1.971 ↓ 20.0 20 1

Sort (cost=34.01..34.02 rows=1 width=34) (actual time=1.969..1.971 rows=20 loops=1)

  • Sort Key: h.szakag, c.rovid_nev
  • Sort Method: quicksort Memory: 26kB
6. 0.018 1.900 ↓ 20.0 20 1

Nested Loop (cost=5.15..34.00 rows=1 width=34) (actual time=0.171..1.900 rows=20 loops=1)

7. 0.014 1.802 ↓ 20.0 20 1

Nested Loop (cost=4.86..26.35 rows=1 width=11) (actual time=0.155..1.802 rows=20 loops=1)

  • Join Filter: (hs.halozat = h.halozat)
8. 0.014 1.708 ↓ 20.0 20 1

Nested Loop (cost=4.59..23.12 rows=1 width=12) (actual time=0.135..1.708 rows=20 loops=1)

9. 0.129 1.547 ↓ 21.0 21 1

Nested Loop (cost=4.30..14.80 rows=1 width=10) (actual time=0.111..1.547 rows=21 loops=1)

10. 1.026 1.026 ↓ 28.0 28 1

CTE Scan on network_by_settlement ns (cost=0.00..0.02 rows=1 width=4) (actual time=0.040..1.026 rows=28 loops=1)

11. 0.252 0.392 ↑ 1.0 1 28

Bitmap Heap Scan on halozat_service hs (cost=4.30..14.77 rows=1 width=6) (actual time=0.012..0.014 rows=1 loops=28)

  • Recheck Cond: (halozat = ns.halozat)
  • Filter: ((url IS NOT NULL) AND ellenorzes_eredmeny AND (upper(ervenyes) IS NULL) AND (servicetipus = 'M'::bpchar))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=54
12. 0.140 0.140 ↑ 1.5 2 28

Bitmap Index Scan on pk_halozat_gisservice (cost=0.00..4.30 rows=3 width=0) (actual time=0.005..0.005 rows=2 loops=28)

  • Index Cond: (halozat = ns.halozat)
13. 0.147 0.147 ↑ 1.0 1 21

Index Scan using pk_halozat_service_layers on halozat_service_layers hsl (cost=0.28..8.30 rows=1 width=6) (actual time=0.006..0.007 rows=1 loops=21)

  • Index Cond: ((halozat = hs.halozat) AND (service = hs.service))
  • Filter: (upper(ervenyes) IS NULL)
14. 0.080 0.080 ↑ 1.0 1 20

Index Scan using pk_halozat on halozat h (cost=0.28..3.22 rows=1 width=11) (actual time=0.004..0.004 rows=1 loops=20)

  • Index Cond: (halozat = hsl.halozat)
  • Filter: ((megnyitva IS NOT NULL) AND (upper(ervenyes) IS NULL))
15. 0.080 0.080 ↑ 1.0 1 20

Index Scan using pk_ceg on ceg c (cost=0.28..7.63 rows=1 width=31) (actual time=0.004..0.004 rows=1 loops=20)

  • Index Cond: (ceg = h.uzemelteto)
  • Filter: (tanusitvany IS NOT NULL)
16. 1.979 1.979 ↓ 20.0 20 1

CTE Scan on services (cost=0.00..0.02 rows=1 width=434) (actual time=1.971..1.979 rows=20 loops=1)

Planning time : 2.082 ms
Execution time : 2.373 ms