explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GRG : Optimization for: Optimization for: plan #fhQ4; plan #NZTB

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 17.304 13,769.667 ↑ 1.0 806 1

Index Scan Backward using acpref_id_pkey on aircraftprefs ap (cost=5.98..7,900,008.28 rows=840 width=269) (actual time=4.600..13,769.667 rows=806 loops=1)

  • Filter: (NOT deletedflag)
  • Rows Removed by Filter: 1
2.          

Initplan (forIndex Scan Backward)

3. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on prefs (cost=0.00..2.85 rows=1 width=15) (actual time=0.004..0.010 rows=1 loops=1)

  • Filter: (pref_id = 2)
  • Rows Removed by Filter: 67
4. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on prefs prefs_1 (cost=0.00..2.85 rows=1 width=15) (actual time=0.005..0.011 rows=1 loops=1)

  • Filter: (pref_id = 2)
  • Rows Removed by Filter: 67
5.          

SubPlan (forIndex Scan Backward)

6. 3.224 3.224 ↑ 1.0 1 806

Index Scan using aircraft_id_pkey on aircraft (cost=0.14..8.16 rows=1 width=7) (actual time=0.004..0.004 rows=1 loops=806)

  • Index Cond: (aircraft_id = ap.ac_id)
7. 3.850 3.850 ↑ 1.0 1 385

Index Scan using aptidentifier_idx on airport (cost=0.29..8.30 rows=1 width=5) (actual time=0.010..0.010 rows=1 loops=385)

  • Index Cond: (identifier = ap.airport_id)
8. 899.886 900.164 ↑ 70.0 1 278

Seq Scan on aptfbo (cost=0.01..830.53 rows=70 width=19) (actual time=1.567..3.238 rows=1 loops=278)

  • Filter: ((aptfbo_id)::text = $3)
  • Rows Removed by Filter: 13914
9.          

Initplan (forSeq Scan)

10. 0.278 0.278 ↑ 1.0 1 278

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=278)

11. 0.000 0.000 ↓ 0.0 0

Seq Scan on aptcatering (cost=0.01..140.38 rows=18 width=14) (never executed)

  • Filter: ((aptcatering_id)::text = $5)
12.          

Initplan (forSeq Scan)

13. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)

14. 0.012 0.036 ↓ 0.0 0 4

Limit (cost=0.28..8.29 rows=1 width=6) (actual time=0.009..0.009 rows=0 loops=4)

15. 0.024 0.024 ↓ 0.0 0 4

Index Scan using fuel_icao_idx on aptfuel (cost=0.28..8.29 rows=1 width=6) (actual time=0.006..0.006 rows=0 loops=4)

  • Index Cond: (icao = split_part(ap.svcprovider_id, '^'::text, 1))
16. 15.014 15.017 ↓ 0.0 0 1

Seq Scan on apthotel (cost=0.01..3,729.60 rows=299 width=26) (actual time=15.017..15.017 rows=0 loops=1)

  • Filter: ((apthotel_id)::text = $8)
  • Rows Removed by Filter: 59862
17.          

Initplan (forSeq Scan)

18. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.003..0.003 rows=1 loops=1)

19. 0.000 0.000 ↓ 0.0 0

Seq Scan on apttransport (cost=0.01..979.79 rows=106 width=24) (never executed)

  • Filter: ((apttransport_id)::text = $10)
20.          

Initplan (forSeq Scan)

21. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)

22. 12,817.161 12,817.684 ↑ 565.0 1 523

Seq Scan on aptotherservice (cost=0.01..3,686.57 rows=565 width=18) (actual time=16.877..24.508 rows=1 loops=523)

  • Filter: ((aptother_id)::text = $12)
  • Rows Removed by Filter: 112945
23.          

Initplan (forSeq Scan)

24. 0.523 0.523 ↑ 1.0 1 523

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=523)

25. 0.135 0.135 ↑ 1.0 1 27

Index Scan using customer_id_pkey on customer (cost=0.28..8.29 rows=1 width=21) (actual time=0.005..0.005 rows=1 loops=27)

  • Index Cond: (customer_id = ap.customer_id)
26. 12.090 12.090 ↑ 1.0 1 806

Seq Scan on acconfig (cost=0.00..4.60 rows=1 width=8) (actual time=0.013..0.015 rows=1 loops=806)

  • Filter: (acconfig_id = ap.acconfig_id)
  • Rows Removed by Filter: 131
27. 0.050 0.050 ↑ 1.0 1 10

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.005..0.005 rows=1 loops=10)

28. 0.054 0.054 ↑ 1.0 1 9

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=9)

29. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)

30. 0.020 0.020 ↑ 1.0 1 10

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=10)

31. 0.018 0.018 ↑ 1.0 1 9

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=9)

32. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)