explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DHCd

Settings
# exclusive inclusive rows x rows loops node
1. 0.209 121,289.001 ↓ 0.0 0 1

Update on zen_xc_scores (cost=0.00..5,238,900.31 rows=1 width=990) (actual time=121,289.001..121,289.001 rows=0 loops=1)

2. 0.200 121,288.792 ↑ 1.0 1 1

Nested Loop (cost=0.00..5,238,900.31 rows=1 width=990) (actual time=121,288.779..121,288.792 rows=1 loops=1)

3. 0.007 0.095 ↑ 1.0 1 1

Nested Loop (cost=0.00..16.76 rows=1 width=984) (actual time=0.087..0.095 rows=1 loops=1)

4. 0.055 0.055 ↑ 1.0 1 1

Index Scan using fki_zen_xc_scores_pilot_league on zen_xc_scores (cost=0.00..8.36 rows=1 width=974) (actual time=0.053..0.055 rows=1 loops=1)

  • Index Cond: (pilot_league = 1,119,341)
5. 0.033 0.033 ↑ 1.0 1 1

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..8.39 rows=1 width=14) (actual time=0.031..0.033 rows=1 loops=1)

  • Index Cond: (id = 1,119,341)
  • Filter: ((is_valid OR (is_valid IS NULL)) AND (league = 1,821))
6. 0.025 0.025 ↑ 1.0 1 1

Index Scan using zen_xt_users_id_country on zen_xt_users pilots (cost=0.00..8.28 rows=1 width=10) (actual time=0.022..0.025 rows=1 loops=1)

  • Index Cond: (id = plgs.pilot)
7.          

SubPlan (for Nested Loop)

8. 0.108 9.934 ↑ 1.0 1 1

Aggregate (cost=1,637.32..1,637.33 rows=1 width=0) (actual time=9.934..9.934 rows=1 loops=1)

9. 0.471 9.826 ↓ 148.0 148 1

Nested Loop (cost=0.00..1,637.32 rows=1 width=0) (actual time=0.149..9.826 rows=148 loops=1)

10. 0.505 8.014 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,632.14 rows=1 width=4) (actual time=0.121..8.014 rows=149 loops=1)

11. 0.456 6.615 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,623.58 rows=1 width=8) (actual time=0.101..6.615 rows=149 loops=1)

12. 0.397 4.371 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,604.53 rows=1 width=12) (actual time=0.077..4.371 rows=149 loops=1)

13. 0.609 3.378 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,599.17 rows=1 width=16) (actual time=0.067..3.378 rows=149 loops=1)

14. 1.153 1.153 ↓ 1.6 202 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.62 rows=124 width=8) (actual time=0.038..1.153 rows=202 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3))
15. 1.616 1.616 ↑ 1.0 1 202

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (actual time=0.007..0.008 rows=1 loops=202)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
16. 0.596 0.596 ↑ 1.0 1 149

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=149)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
17. 1.788 1.788 ↑ 1.0 1 149

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.011..0.012 rows=1 loops=149)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
18. 0.894 0.894 ↑ 1.0 1 149

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=149)

  • Index Cond: (id = flgs.flight)
19. 1.341 1.341 ↑ 1.0 1 149

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=149)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
20. 0.004 0.068 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,482.68 rows=1 width=0) (actual time=0.068..0.068 rows=1 loops=1)

21. 0.005 0.059 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,477.50 rows=1 width=4) (actual time=0.059..0.059 rows=1 loops=1)

22. 0.004 0.048 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,468.94 rows=1 width=8) (actual time=0.048..0.048 rows=1 loops=1)

23. 0.004 0.036 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,449.89 rows=1 width=12) (actual time=0.036..0.036 rows=1 loops=1)

24. 0.006 0.028 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,444.53 rows=1 width=16) (actual time=0.028..0.028 rows=1 loops=1)

25. 0.015 0.015 ↑ 107.0 1 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.97 rows=107 width=8) (actual time=0.015..0.015 rows=1 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND is_single_flight AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
26. 0.007 0.007 ↑ 1.0 1 1

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
27. 0.004 0.004 ↑ 1.0 1 1

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
28. 0.008 0.008 ↑ 1.0 1 1

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
29. 0.006 0.006 ↑ 1.0 1 1

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id = flgs.flight)
30. 0.005 0.005 ↑ 1.0 1 1

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
31. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..423,717.40 rows=8,787 width=4) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..255,464.08 rows=8,836 width=8) (never executed)

33. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..208,278.18 rows=9,120 width=12) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,239.21 rows=9,127 width=16) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
36. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
37. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
38. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (never executed)

39. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (never executed)

  • Filter: (is_valid OR (is_valid IS NULL))
40. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.02 rows=1 width=12) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND is_single_flight AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
41. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.11 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
43. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
44. 0.002 10.050 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,149.64 rows=1 width=0) (actual time=10.050..10.050 rows=0 loops=1)

45. 0.003 10.048 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,144.47 rows=1 width=4) (actual time=10.048..10.048 rows=0 loops=1)

46. 0.002 10.045 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,135.90 rows=1 width=8) (actual time=10.045..10.045 rows=0 loops=1)

47. 0.001 10.043 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,116.86 rows=1 width=12) (actual time=10.043..10.043 rows=0 loops=1)

48. 0.003 10.042 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,111.49 rows=1 width=16) (actual time=10.042..10.042 rows=0 loops=1)

49. 0.222 10.039 ↓ 0.0 0 1

Hash Left Join (cost=173.81..646.51 rows=51 width=4) (actual time=10.039..10.039 rows=0 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = 'C'::text) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = 'C'::text))
50. 0.379 5.352 ↓ 1.8 202 1

Hash Left Join (cost=86.91..557.51 rows=114 width=11) (actual time=4.531..5.352 rows=202 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
51. 0.475 0.475 ↓ 1.8 202 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.97 rows=114 width=10) (actual time=0.013..0.475 rows=202 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
52. 2.143 4.498 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.498..4.498 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
53. 2.355 2.355 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.012..2.355 rows=2,692 loops=1)

54. 2.218 4.465 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.465..4.465 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
55. 2.247 2.247 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.004..2.247 rows=2,692 loops=1)

56. 0.000 0.000 ↓ 0.0 0

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (never executed)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
57. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
58. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
59. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
60. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
61. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..276,906.21 rows=4,176 width=4) (never executed)

62. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..196,949.70 rows=4,199 width=8) (never executed)

63. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..174,526.05 rows=4,334 width=12) (never executed)

64. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=24,344.01..143,729.40 rows=4,337 width=16) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = 'C'::text) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = 'C'::text))
65. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=24,257.10..143,464.78 rows=9,695 width=23) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
66. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,239.21 rows=9,695 width=22) (never executed)

67. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
68. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
69. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
70. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (never executed)

71. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (never executed)

  • Filter: (is_valid OR (is_valid IS NULL))
72. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.02 rows=1 width=14) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
73. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

74. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

75. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

76. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

77. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.09 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
78. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
79. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
80. 0.003 9.943 ↓ 0.0 0 1

Nested Loop (cost=173.81..912.59 rows=1 width=0) (actual time=9.943..9.943 rows=0 loops=1)

81. 0.002 9.940 ↓ 0.0 0 1

Nested Loop (cost=173.81..907.41 rows=1 width=4) (actual time=9.940..9.940 rows=0 loops=1)

82. 0.002 9.938 ↓ 0.0 0 1

Nested Loop (cost=173.81..898.85 rows=1 width=8) (actual time=9.938..9.938 rows=0 loops=1)

83. 0.002 9.936 ↓ 0.0 0 1

Nested Loop (cost=173.81..879.81 rows=1 width=12) (actual time=9.936..9.936 rows=0 loops=1)

84. 0.002 9.934 ↓ 0.0 0 1

Nested Loop (cost=173.81..874.44 rows=1 width=16) (actual time=9.934..9.934 rows=0 loops=1)

85. 0.228 9.932 ↓ 0.0 0 1

Hash Left Join (cost=173.81..646.51 rows=25 width=4) (actual time=9.932..9.932 rows=0 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = 'B'::text) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = 'B'::text))
86. 0.431 5.285 ↓ 1.8 202 1

Hash Left Join (cost=86.91..557.51 rows=114 width=11) (actual time=4.431..5.285 rows=202 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
87. 0.457 0.457 ↓ 1.8 202 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.97 rows=114 width=10) (actual time=0.017..0.457 rows=202 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
88. 2.180 4.397 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.397..4.397 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
89. 2.217 2.217 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.004..2.217 rows=2,692 loops=1)

90. 2.160 4.419 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.419..4.419 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
91. 2.259 2.259 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.004..2.259 rows=2,692 loops=1)

92. 0.000 0.000 ↓ 0.0 0

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (never executed)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
93. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
94. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
95. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
96. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
97. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=796.93..200,038.93 rows=2,051 width=4) (never executed)

98. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=796.93..160,774.74 rows=2,062 width=8) (never executed)

99. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=796.93..149,759.52 rows=2,129 width=12) (never executed)

100. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=796.93..134,634.59 rows=2,130 width=16) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=796.93..122,584.32 rows=2,246 width=20) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = 'B'::text) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = 'B'::text))
102. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=710.03..122,310.07 rows=10,220 width=27) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
103. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=623.12..122,076.98 rows=10,220 width=26) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
105. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
106. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.02 rows=1 width=14) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
107. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

108. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

109. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

110. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

111. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
112. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.09 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
113. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
114. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
115. 0.006 0.092 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,482.68 rows=1 width=0) (actual time=0.092..0.092 rows=1 loops=1)

116. 0.005 0.077 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,477.50 rows=1 width=4) (actual time=0.077..0.077 rows=1 loops=1)

117. 0.005 0.064 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,468.94 rows=1 width=8) (actual time=0.064..0.064 rows=1 loops=1)

118. 0.004 0.047 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,449.89 rows=1 width=12) (actual time=0.047..0.047 rows=1 loops=1)

119. 0.006 0.034 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,444.53 rows=1 width=16) (actual time=0.034..0.034 rows=1 loops=1)

120. 0.017 0.017 ↑ 107.0 1 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.97 rows=107 width=8) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND is_single_flight AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
121. 0.011 0.011 ↑ 1.0 1 1

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (actual time=0.011..0.011 rows=1 loops=1)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
122. 0.009 0.009 ↑ 1.0 1 1

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
123. 0.012 0.012 ↑ 1.0 1 1

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.012..0.012 rows=1 loops=1)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
124. 0.008 0.008 ↑ 1.0 1 1

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (id = flgs.flight)
125. 0.009 0.009 ↑ 1.0 1 1

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
126. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..423,717.40 rows=8,787 width=4) (never executed)

127. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..255,464.08 rows=8,836 width=8) (never executed)

128. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..208,278.18 rows=9,120 width=12) (never executed)

129. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,239.21 rows=9,127 width=16) (never executed)

130. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
131. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
132. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
133. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (never executed)

134. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (never executed)

  • Filter: (is_valid OR (is_valid IS NULL))
135. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.02 rows=1 width=12) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND is_single_flight AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
136. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.11 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
137. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
138. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
139. 0.002 9.944 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,149.64 rows=1 width=0) (actual time=9.944..9.944 rows=0 loops=1)

140. 0.004 9.942 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,144.47 rows=1 width=4) (actual time=9.942..9.942 rows=0 loops=1)

141. 0.002 9.938 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,135.90 rows=1 width=8) (actual time=9.938..9.938 rows=0 loops=1)

142. 0.002 9.936 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,116.86 rows=1 width=12) (actual time=9.936..9.936 rows=0 loops=1)

143. 0.002 9.934 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,111.49 rows=1 width=16) (actual time=9.934..9.934 rows=0 loops=1)

144. 0.212 9.932 ↓ 0.0 0 1

Hash Left Join (cost=173.81..646.51 rows=51 width=4) (actual time=9.932..9.932 rows=0 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = 'C'::text) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = 'C'::text))
145. 0.386 5.290 ↓ 1.8 202 1

Hash Left Join (cost=86.91..557.51 rows=114 width=11) (actual time=4.455..5.290 rows=202 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
146. 0.478 0.478 ↓ 1.8 202 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.97 rows=114 width=10) (actual time=0.013..0.478 rows=202 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
147. 2.165 4.426 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.426..4.426 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
148. 2.261 2.261 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.005..2.261 rows=2,692 loops=1)

149. 2.202 4.430 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.430..4.430 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
150. 2.228 2.228 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.005..2.228 rows=2,692 loops=1)

151. 0.000 0.000 ↓ 0.0 0

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (never executed)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
152. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
153. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
154. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
155. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
156. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..276,906.21 rows=4,176 width=4) (never executed)

157. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..196,949.70 rows=4,199 width=8) (never executed)

158. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..174,526.05 rows=4,334 width=12) (never executed)

159. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=24,344.01..143,729.40 rows=4,337 width=16) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = 'C'::text) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = 'C'::text))
160. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=24,257.10..143,464.78 rows=9,695 width=23) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
161. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,239.21 rows=9,695 width=22) (never executed)

162. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
163. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
164. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
165. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (never executed)

166. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (never executed)

  • Filter: (is_valid OR (is_valid IS NULL))
167. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.02 rows=1 width=14) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
168. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

169. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

170. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

171. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

172. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.09 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
173. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
174. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
175. 0.004 0.082 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,482.68 rows=1 width=0) (actual time=0.082..0.082 rows=1 loops=1)

176. 0.006 0.071 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,477.50 rows=1 width=4) (actual time=0.071..0.071 rows=1 loops=1)

177. 0.003 0.058 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,468.94 rows=1 width=8) (actual time=0.058..0.058 rows=1 loops=1)

178. 0.006 0.045 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,449.89 rows=1 width=12) (actual time=0.045..0.045 rows=1 loops=1)

179. 0.006 0.032 ↑ 1.0 1 1

Nested Loop (cost=0.00..1,444.53 rows=1 width=16) (actual time=0.032..0.032 rows=1 loops=1)

180. 0.016 0.016 ↑ 107.0 1 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.97 rows=107 width=8) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND is_single_flight AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
181. 0.010 0.010 ↑ 1.0 1 1

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
182. 0.007 0.007 ↑ 1.0 1 1

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
183. 0.010 0.010 ↑ 1.0 1 1

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
184. 0.007 0.007 ↑ 1.0 1 1

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id = flgs.flight)
185. 0.007 0.007 ↑ 1.0 1 1

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
186. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..423,717.40 rows=8,787 width=4) (never executed)

187. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..255,464.08 rows=8,836 width=8) (never executed)

188. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..208,278.18 rows=9,120 width=12) (never executed)

189. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,239.21 rows=9,127 width=16) (never executed)

190. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
191. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
192. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
193. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (never executed)

194. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (never executed)

  • Filter: (is_valid OR (is_valid IS NULL))
195. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.02 rows=1 width=12) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND is_single_flight AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
196. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.11 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
197. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
198. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
199. 0.003 10.000 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,277.28 rows=1 width=0) (actual time=10.000..10.000 rows=0 loops=1)

200. 0.003 9.997 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,272.11 rows=1 width=4) (actual time=9.997..9.997 rows=0 loops=1)

201. 0.001 9.994 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,263.54 rows=1 width=8) (actual time=9.994..9.994 rows=0 loops=1)

202. 0.002 9.993 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,244.50 rows=1 width=12) (actual time=9.993..9.993 rows=0 loops=1)

203. 0.003 9.991 ↓ 0.0 0 1

Nested Loop (cost=173.81..1,239.14 rows=1 width=16) (actual time=9.991..9.991 rows=0 loops=1)

204. 0.240 9.988 ↓ 0.0 0 1

Hash Left Join (cost=173.81..646.51 rows=65 width=4) (actual time=9.988..9.988 rows=0 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = ANY ('{B,C}'::text[])) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = ANY ('{B,C}'::text[])))
205. 0.377 5.299 ↓ 1.8 202 1

Hash Left Join (cost=86.91..557.51 rows=114 width=11) (actual time=4.450..5.299 rows=202 loops=1)

  • Hash Cond: (flights.glider = gliders.id)
206. 0.499 0.499 ↓ 1.8 202 1

Index Scan using fki_zen_xc_flights_pilot on zen_xc_flights flights (cost=0.00..468.97 rows=114 width=10) (actual time=0.013..0.499 rows=202 loops=1)

  • Index Cond: (pilot = pilots.id)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
207. 2.162 4.423 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.423..4.423 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
208. 2.261 2.261 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.005..2.261 rows=2,692 loops=1)

209. 2.196 4.449 ↓ 1.0 2,692 1

Hash (cost=54.18..54.18 rows=2,618 width=5) (actual time=4.449..4.449 rows=2,692 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 100kB
210. 2.253 2.253 ↓ 1.0 2,692 1

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (actual time=0.004..2.253 rows=2,692 loops=1)

211. 0.000 0.000 ↓ 0.0 0

Index Scan using unique_flight_in_contest on zen_xc_flights_leagues flgs (cost=0.00..9.10 rows=1 width=12) (never executed)

  • Index Cond: ((flight = flights.id) AND (league = 1,821))
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
212. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_pilots_leagues_pkey on zen_xc_pilots_leagues plgs (cost=0.00..5.35 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.pilot_league)
  • Filter: (is_valid OR (is_valid IS NULL))
213. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
214. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..8.55 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
215. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
216. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..313,068.40 rows=5,309 width=4) (never executed)

217. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..211,404.25 rows=5,339 width=8) (never executed)

218. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,344.01..182,890.92 rows=5,511 width=12) (never executed)

219. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=24,344.01..143,729.40 rows=5,515 width=16) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
  • Filter: (((gliders.glider_category_common)::text = ANY ('{B,C}'::text[])) OR ((COALESCE(gliders.glider_category_common, flights.glider_category_common))::text = ANY ('{B,C}'::text[])))
220. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=24,257.10..143,464.78 rows=9,695 width=23) (never executed)

  • Hash Cond: (flights.glider = gliders.id)
221. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,239.21 rows=9,695 width=22) (never executed)

222. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
223. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
224. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
225. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (never executed)

226. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (never executed)

  • Filter: (is_valid OR (is_valid IS NULL))
227. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.02 rows=1 width=14) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
228. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

229. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

230. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.18..54.18 rows=2,618 width=5) (never executed)

231. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_catalogue_gliders gliders (cost=0.00..54.18 rows=2,618 width=5) (never executed)

232. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.09 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
233. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.16 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
234. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
235. 0.008 3.733 ↑ 1.0 1 1

Aggregate (cost=1,421.53..1,421.54 rows=1 width=4) (actual time=3.732..3.733 rows=1 loops=1)

236. 0.017 3.725 ↓ 4.0 4 1

Nested Loop (cost=1,403.88..1,421.52 rows=1 width=4) (actual time=3.641..3.725 rows=4 loops=1)

237. 0.022 3.688 ↓ 4.0 4 1

Nested Loop (cost=1,403.88..1,412.53 rows=1 width=8) (actual time=3.632..3.688 rows=4 loops=1)

238. 0.007 3.618 ↓ 4.0 4 1

Limit (cost=1,403.88..1,403.89 rows=1 width=8) (actual time=3.610..3.618 rows=4 loops=1)

239. 0.194 3.611 ↓ 4.0 4 1

Sort (cost=1,403.88..1,403.89 rows=1 width=8) (actual time=3.608..3.611 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
240. 0.687 3.417 ↓ 148.0 148 1

Nested Loop (cost=0.00..1,403.87 rows=1 width=8) (actual time=0.095..3.417 rows=148 loops=1)

241. 0.921 0.921 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.063..0.921 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
242. 1.809 1.809 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
243. 0.048 0.048 ↑ 1.0 1 4

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (actual time=0.012..0.012 rows=1 loops=4)

  • Index Cond: (id_flight = fl.id_flight)
  • Filter: flight_is_active
244. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=4)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
245. 0.008 6.334 ↑ 1.0 1 1

Aggregate (cost=5,661.73..5,661.74 rows=1 width=4) (actual time=6.334..6.334 rows=1 loops=1)

246. 0.017 6.326 ↓ 4.0 4 1

Nested Loop (cost=5,617.07..5,661.73 rows=1 width=4) (actual time=6.256..6.326 rows=4 loops=1)

247. 0.021 6.277 ↓ 4.0 4 1

Nested Loop (cost=5,617.07..5,653.10 rows=1 width=12) (actual time=6.246..6.277 rows=4 loops=1)

248. 0.006 6.240 ↑ 1.0 4 1

Limit (cost=5,617.07..5,617.08 rows=4 width=8) (actual time=6.234..6.240 rows=4 loops=1)

249. 0.014 6.234 ↑ 1.0 4 1

Sort (cost=5,617.07..5,617.08 rows=4 width=8) (actual time=6.233..6.234 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
250. 0.019 6.220 ↓ 1.5 6 1

HashAggregate (cost=5,616.99..5,617.03 rows=4 width=8) (actual time=6.216..6.220 rows=6 loops=1)

251. 0.010 6.201 ↓ 1.5 6 1

Append (cost=1,404.19..5,616.97 rows=4 width=8) (actual time=1.756..6.201 rows=6 loops=1)

252. 0.004 1.760 ↓ 4.0 4 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.755..1.760 rows=4 loops=1)

253. 0.109 1.756 ↓ 4.0 4 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.753..1.756 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
254. 0.517 1.647 ↓ 119.0 119 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=0.081..1.647 rows=119 loops=1)

255. 0.326 0.326 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.017..0.326 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
256. 0.804 0.804 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
257. 0.005 4.431 ↑ 1.5 2 1

Limit (cost=4,212.73..4,212.74 rows=3 width=8) (actual time=4.427..4.431 rows=2 loops=1)

258. 0.012 4.426 ↑ 1.5 2 1

Sort (cost=4,212.73..4,212.74 rows=3 width=8) (actual time=4.425..4.426 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
259. 0.009 4.414 ↑ 1.5 2 1

HashAggregate (cost=4,212.68..4,212.71 rows=3 width=8) (actual time=4.413..4.414 rows=2 loops=1)

260. 0.006 4.405 ↑ 1.5 2 1

Append (cost=1,404.19..4,212.66 rows=3 width=8) (actual time=4.399..4.405 rows=2 loops=1)

261. 0.002 1.408 ↓ 0.0 0 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.408..1.408 rows=0 loops=1)

262. 0.007 1.406 ↓ 0.0 0 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.406..1.406 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
263. 0.475 1.399 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=1.399..1.399 rows=0 loops=1)

264. 0.321 0.321 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.017..0.321 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
265. 0.603 0.603 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
266. 0.004 2.991 ↑ 1.0 2 1

Limit (cost=2,808.44..2,808.44 rows=2 width=8) (actual time=2.988..2.991 rows=2 loops=1)

267. 0.014 2.987 ↑ 1.0 2 1

Sort (cost=2,808.44..2,808.44 rows=2 width=8) (actual time=2.987..2.987 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
268. 0.007 2.973 ↓ 1.5 3 1

Unique (cost=2,808.41..2,808.43 rows=2 width=8) (actual time=2.966..2.973 rows=3 loops=1)

269. 0.028 2.966 ↓ 1.5 3 1

Sort (cost=2,808.41..2,808.42 rows=2 width=8) (actual time=2.964..2.966 rows=3 loops=1)

  • Sort Key: fl.id_flight, rl.route_points
  • Sort Method: quicksort Memory: 25kB
270. 0.010 2.938 ↓ 1.5 3 1

Append (cost=1,404.19..2,808.40 rows=2 width=8) (actual time=1.456..2.938 rows=3 loops=1)

271. 0.004 1.456 ↓ 2.0 2 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.453..1.456 rows=2 loops=1)

272. 0.017 1.452 ↓ 2.0 2 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.451..1.452 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
273. 0.312 1.435 ↓ 8.0 8 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=0.030..1.435 rows=8 loops=1)

274. 0.319 0.319 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.016..0.319 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
275. 0.804 0.804 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone2'::text))
276. 0.001 1.472 ↑ 1.0 1 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.472..1.472 rows=1 loops=1)

277. 0.027 1.471 ↑ 1.0 1 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.471..1.471 rows=1 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
278. 0.506 1.444 ↓ 21.0 21 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=0.740..1.444 rows=21 loops=1)

279. 0.335 0.335 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.017..0.335 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
280. 0.603 0.603 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'global'::text))
281. 0.016 0.016 ↑ 1.0 1 4

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=4)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
282. 0.032 0.032 ↑ 1.0 1 4

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=4)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
283. 0.003 0.830 ↑ 1.0 1 1

Aggregate (cost=1,487.10..1,487.11 rows=1 width=4) (actual time=0.830..0.830 rows=1 loops=1)

284. 0.002 0.827 ↓ 0.0 0 1

Nested Loop (cost=1,442.43..1,487.10 rows=1 width=4) (actual time=0.827..0.827 rows=0 loops=1)

285. 0.003 0.825 ↓ 0.0 0 1

Nested Loop (cost=1,442.43..1,478.46 rows=1 width=12) (actual time=0.825..0.825 rows=0 loops=1)

286. 0.002 0.822 ↓ 0.0 0 1

Limit (cost=1,442.43..1,442.44 rows=4 width=8) (actual time=0.822..0.822 rows=0 loops=1)

287. 0.008 0.820 ↓ 0.0 0 1

Sort (cost=1,442.43..1,442.44 rows=4 width=8) (actual time=0.820..0.820 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
288. 0.004 0.812 ↓ 0.0 0 1

HashAggregate (cost=1,442.35..1,442.39 rows=4 width=8) (actual time=0.812..0.812 rows=0 loops=1)

289. 0.003 0.808 ↓ 0.0 0 1

Append (cost=360.53..1,442.33 rows=4 width=8) (actual time=0.808..0.808 rows=0 loops=1)

290. 0.002 0.195 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.195..0.195 rows=0 loops=1)

291. 0.007 0.193 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.193..0.193 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
292. 0.003 0.186 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.186..0.186 rows=0 loops=1)

293. 0.183 0.183 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.183..0.183 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
294. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
295. 0.002 0.610 ↓ 0.0 0 1

Limit (cost=1,081.75..1,081.76 rows=3 width=8) (actual time=0.610..0.610 rows=0 loops=1)

296. 0.006 0.608 ↓ 0.0 0 1

Sort (cost=1,081.75..1,081.76 rows=3 width=8) (actual time=0.608..0.608 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
297. 0.004 0.602 ↓ 0.0 0 1

HashAggregate (cost=1,081.70..1,081.73 rows=3 width=8) (actual time=0.602..0.602 rows=0 loops=1)

298. 0.004 0.598 ↓ 0.0 0 1

Append (cost=360.53..1,081.68 rows=3 width=8) (actual time=0.598..0.598 rows=0 loops=1)

299. 0.001 0.192 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.192..0.192 rows=0 loops=1)

300. 0.008 0.191 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.191..0.191 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
301. 0.003 0.183 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.183..0.183 rows=0 loops=1)

302. 0.180 0.180 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.180..0.180 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
303. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
304. 0.002 0.402 ↓ 0.0 0 1

Limit (cost=721.12..721.12 rows=2 width=8) (actual time=0.402..0.402 rows=0 loops=1)

305. 0.007 0.400 ↓ 0.0 0 1

Sort (cost=721.12..721.12 rows=2 width=8) (actual time=0.400..0.400 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
306. 0.002 0.393 ↓ 0.0 0 1

Unique (cost=721.09..721.11 rows=2 width=8) (actual time=0.393..0.393 rows=0 loops=1)

307. 0.006 0.391 ↓ 0.0 0 1

Sort (cost=721.09..721.10 rows=2 width=8) (actual time=0.391..0.391 rows=0 loops=1)

  • Sort Key: fl.id_flight, rl.route_points
  • Sort Method: quicksort Memory: 25kB
308. 0.004 0.385 ↓ 0.0 0 1

Append (cost=360.53..721.08 rows=2 width=8) (actual time=0.385..0.385 rows=0 loops=1)

309. 0.002 0.190 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.190..0.190 rows=0 loops=1)

310. 0.005 0.188 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.188..0.188 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
311. 0.003 0.183 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.183..0.183 rows=0 loops=1)

312. 0.180 0.180 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.180..0.180 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
313. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone2'::text))
314. 0.002 0.191 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.191..0.191 rows=0 loops=1)

315. 0.007 0.189 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.189..0.189 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
316. 0.003 0.182 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.182..0.182 rows=0 loops=1)

317. 0.179 0.179 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.179..0.179 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
318. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'global'::text))
319. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
320. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (never executed)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
321. 0.017 1.985 ↓ 4.0 4 1

Nested Loop (cost=1,403.88..1,421.52 rows=1 width=4) (actual time=1.926..1.985 rows=4 loops=1)

322. 0.015 1.948 ↓ 4.0 4 1

Nested Loop (cost=1,403.88..1,412.53 rows=1 width=8) (actual time=1.916..1.948 rows=4 loops=1)

323. 0.007 1.913 ↓ 4.0 4 1

Limit (cost=1,403.88..1,403.89 rows=1 width=8) (actual time=1.906..1.913 rows=4 loops=1)

324. 0.147 1.906 ↓ 4.0 4 1

Sort (cost=1,403.88..1,403.89 rows=1 width=8) (actual time=1.904..1.906 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
325. 0.626 1.759 ↓ 148.0 148 1

Nested Loop (cost=0.00..1,403.87 rows=1 width=8) (actual time=0.028..1.759 rows=148 loops=1)

326. 0.329 0.329 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.016..0.329 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
327. 0.804 0.804 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
328. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=4)

  • Index Cond: (id_flight = fl.id_flight)
  • Filter: flight_is_active
329. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=4)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
330. 0.017 6.428 ↓ 4.0 4 1

Nested Loop (cost=5,617.07..5,661.73 rows=1 width=4) (actual time=6.370..6.428 rows=4 loops=1)

331. 0.016 6.391 ↓ 4.0 4 1

Nested Loop (cost=5,617.07..5,653.10 rows=1 width=8) (actual time=6.360..6.391 rows=4 loops=1)

332. 0.007 6.355 ↑ 1.0 4 1

Limit (cost=5,617.07..5,617.08 rows=4 width=8) (actual time=6.349..6.355 rows=4 loops=1)

333. 0.035 6.348 ↑ 1.0 4 1

Sort (cost=5,617.07..5,617.08 rows=4 width=8) (actual time=6.347..6.348 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
334. 0.018 6.313 ↓ 1.5 6 1

HashAggregate (cost=5,616.99..5,617.03 rows=4 width=8) (actual time=6.307..6.313 rows=6 loops=1)

335. 0.014 6.295 ↓ 1.5 6 1

Append (cost=1,404.19..5,616.97 rows=4 width=8) (actual time=1.800..6.295 rows=6 loops=1)

336. 0.004 1.802 ↓ 4.0 4 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.797..1.802 rows=4 loops=1)

337. 0.124 1.798 ↓ 4.0 4 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.795..1.798 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
338. 0.542 1.674 ↓ 119.0 119 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=0.081..1.674 rows=119 loops=1)

339. 0.328 0.328 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.017..0.328 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
340. 0.804 0.804 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
341. 0.002 4.479 ↑ 1.5 2 1

Limit (cost=4,212.73..4,212.74 rows=3 width=8) (actual time=4.476..4.479 rows=2 loops=1)

342. 0.011 4.477 ↑ 1.5 2 1

Sort (cost=4,212.73..4,212.74 rows=3 width=8) (actual time=4.475..4.477 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
343. 0.009 4.466 ↑ 1.5 2 1

HashAggregate (cost=4,212.68..4,212.71 rows=3 width=8) (actual time=4.464..4.466 rows=2 loops=1)

344. 0.006 4.457 ↑ 1.5 2 1

Append (cost=1,404.19..4,212.66 rows=3 width=8) (actual time=4.452..4.457 rows=2 loops=1)

345. 0.003 1.483 ↓ 0.0 0 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.483..1.483 rows=0 loops=1)

346. 0.006 1.480 ↓ 0.0 0 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.480..1.480 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
347. 0.355 1.474 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=1.474..1.474 rows=0 loops=1)

348. 0.315 0.315 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.016..0.315 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
349. 0.804 0.804 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
350. 0.002 2.968 ↑ 1.0 2 1

Limit (cost=2,808.44..2,808.44 rows=2 width=8) (actual time=2.966..2.968 rows=2 loops=1)

351. 0.010 2.966 ↑ 1.0 2 1

Sort (cost=2,808.44..2,808.44 rows=2 width=8) (actual time=2.965..2.966 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
352. 0.008 2.956 ↓ 1.5 3 1

Unique (cost=2,808.41..2,808.43 rows=2 width=8) (actual time=2.949..2.956 rows=3 loops=1)

353. 0.014 2.948 ↓ 1.5 3 1

Sort (cost=2,808.41..2,808.42 rows=2 width=8) (actual time=2.946..2.948 rows=3 loops=1)

  • Sort Key: fl.id_flight, rl.route_points
  • Sort Method: quicksort Memory: 25kB
354. 0.008 2.934 ↓ 1.5 3 1

Append (cost=1,404.19..2,808.40 rows=2 width=8) (actual time=1.446..2.934 rows=3 loops=1)

355. 0.003 1.445 ↓ 2.0 2 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.443..1.445 rows=2 loops=1)

356. 0.016 1.442 ↓ 2.0 2 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.442..1.442 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
357. 0.487 1.426 ↓ 8.0 8 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=0.030..1.426 rows=8 loops=1)

358. 0.336 0.336 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.016..0.336 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
359. 0.603 0.603 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone2'::text))
360. 0.003 1.481 ↑ 1.0 1 1

Limit (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.480..1.481 rows=1 loops=1)

361. 0.027 1.478 ↑ 1.0 1 1

Sort (cost=1,404.19..1,404.19 rows=1 width=8) (actual time=1.478..1.478 rows=1 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
362. 0.329 1.451 ↓ 21.0 21 1

Nested Loop (cost=0.00..1,404.18 rows=1 width=8) (actual time=0.732..1.451 rows=21 loops=1)

363. 0.318 0.318 ↓ 1.6 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=122 width=4) (actual time=0.017..0.318 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class_fai = 3))
364. 0.804 0.804 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'global'::text))
365. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=4)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
366. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=4)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
367. 0.002 0.820 ↓ 0.0 0 1

Nested Loop (cost=1,442.43..1,487.10 rows=1 width=4) (actual time=0.820..0.820 rows=0 loops=1)

368. 0.002 0.818 ↓ 0.0 0 1

Nested Loop (cost=1,442.43..1,478.46 rows=1 width=8) (actual time=0.818..0.818 rows=0 loops=1)

369. 0.003 0.816 ↓ 0.0 0 1

Limit (cost=1,442.43..1,442.44 rows=4 width=8) (actual time=0.816..0.816 rows=0 loops=1)

370. 0.004 0.813 ↓ 0.0 0 1

Sort (cost=1,442.43..1,442.44 rows=4 width=8) (actual time=0.813..0.813 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
371. 0.003 0.809 ↓ 0.0 0 1

HashAggregate (cost=1,442.35..1,442.39 rows=4 width=8) (actual time=0.809..0.809 rows=0 loops=1)

372. 0.003 0.806 ↓ 0.0 0 1

Append (cost=360.53..1,442.33 rows=4 width=8) (actual time=0.806..0.806 rows=0 loops=1)

373. 0.002 0.194 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.194..0.194 rows=0 loops=1)

374. 0.006 0.192 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.192..0.192 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
375. 0.003 0.186 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.186..0.186 rows=0 loops=1)

376. 0.183 0.183 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.183..0.183 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
377. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
378. 0.001 0.609 ↓ 0.0 0 1

Limit (cost=1,081.75..1,081.76 rows=3 width=8) (actual time=0.609..0.609 rows=0 loops=1)

379. 0.007 0.608 ↓ 0.0 0 1

Sort (cost=1,081.75..1,081.76 rows=3 width=8) (actual time=0.608..0.608 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
380. 0.004 0.601 ↓ 0.0 0 1

HashAggregate (cost=1,081.70..1,081.73 rows=3 width=8) (actual time=0.601..0.601 rows=0 loops=1)

381. 0.003 0.597 ↓ 0.0 0 1

Append (cost=360.53..1,081.68 rows=3 width=8) (actual time=0.597..0.597 rows=0 loops=1)

382. 0.002 0.190 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.190..0.190 rows=0 loops=1)

383. 0.005 0.188 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.188..0.188 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
384. 0.004 0.183 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.183..0.183 rows=0 loops=1)

385. 0.179 0.179 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.179..0.179 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
386. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
387. 0.002 0.404 ↓ 0.0 0 1

Limit (cost=721.12..721.12 rows=2 width=8) (actual time=0.404..0.404 rows=0 loops=1)

388. 0.007 0.402 ↓ 0.0 0 1

Sort (cost=721.12..721.12 rows=2 width=8) (actual time=0.402..0.402 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
389. 0.001 0.395 ↓ 0.0 0 1

Unique (cost=721.09..721.11 rows=2 width=8) (actual time=0.395..0.395 rows=0 loops=1)

390. 0.008 0.394 ↓ 0.0 0 1

Sort (cost=721.09..721.10 rows=2 width=8) (actual time=0.394..0.394 rows=0 loops=1)

  • Sort Key: fl.id_flight, rl.route_points
  • Sort Method: quicksort Memory: 25kB
391. 0.005 0.386 ↓ 0.0 0 1

Append (cost=360.53..721.08 rows=2 width=8) (actual time=0.386..0.386 rows=0 loops=1)

392. 0.002 0.191 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.191..0.191 rows=0 loops=1)

393. 0.006 0.189 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.189..0.189 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
394. 0.003 0.183 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.183..0.183 rows=0 loops=1)

395. 0.180 0.180 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.180..0.180 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
396. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone2'::text))
397. 0.002 0.190 ↓ 0.0 0 1

Limit (cost=360.53..360.53 rows=1 width=8) (actual time=0.190..0.190 rows=0 loops=1)

398. 0.006 0.188 ↓ 0.0 0 1

Sort (cost=360.53..360.53 rows=1 width=8) (actual time=0.188..0.188 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
399. 0.003 0.182 ↓ 0.0 0 1

Nested Loop (cost=0.00..360.52 rows=1 width=8) (actual time=0.182..0.182 rows=0 loops=1)

400. 0.179 0.179 ↓ 0.0 0 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=6 width=4) (actual time=0.179..0.179 rows=0 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'T'::bpchar))
401. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'global'::text))
402. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
403. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (never executed)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
404. 0.008 6.391 ↑ 1.0 1 1

Aggregate (cost=3,538.43..3,538.44 rows=1 width=4) (actual time=6.391..6.391 rows=1 loops=1)

405. 0.012 6.383 ↓ 4.0 4 1

Nested Loop (cost=3,493.76..3,538.42 rows=1 width=4) (actual time=6.328..6.383 rows=4 loops=1)

406. 0.017 6.351 ↓ 4.0 4 1

Nested Loop (cost=3,493.76..3,529.79 rows=1 width=12) (actual time=6.319..6.351 rows=4 loops=1)

407. 0.005 6.314 ↑ 1.0 4 1

Limit (cost=3,493.76..3,493.77 rows=4 width=8) (actual time=6.308..6.314 rows=4 loops=1)

408. 0.016 6.309 ↑ 1.0 4 1

Sort (cost=3,493.76..3,493.77 rows=4 width=8) (actual time=6.307..6.309 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
409. 0.016 6.293 ↓ 1.5 6 1

HashAggregate (cost=3,493.68..3,493.72 rows=4 width=8) (actual time=6.289..6.293 rows=6 loops=1)

410. 0.008 6.277 ↓ 1.5 6 1

Append (cost=873.36..3,493.66 rows=4 width=8) (actual time=1.785..6.277 rows=6 loops=1)

411. 0.006 1.790 ↓ 4.0 4 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.784..1.790 rows=4 loops=1)

412. 0.113 1.784 ↓ 4.0 4 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.782..1.784 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
413. 0.524 1.671 ↓ 119.0 119 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=0.083..1.671 rows=119 loops=1)

414. 0.343 0.343 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.017..0.343 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
415. 0.804 0.804 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
416. 0.006 4.479 ↑ 1.5 2 1

Limit (cost=2,620.25..2,620.26 rows=3 width=8) (actual time=4.475..4.479 rows=2 loops=1)

417. 0.010 4.473 ↑ 1.5 2 1

Sort (cost=2,620.25..2,620.26 rows=3 width=8) (actual time=4.472..4.473 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
418. 0.008 4.463 ↑ 1.5 2 1

HashAggregate (cost=2,620.20..2,620.23 rows=3 width=8) (actual time=4.462..4.463 rows=2 loops=1)

419. 0.006 4.455 ↑ 1.5 2 1

Append (cost=873.36..2,620.18 rows=3 width=8) (actual time=4.450..4.455 rows=2 loops=1)

420. 0.002 1.466 ↓ 0.0 0 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.466..1.466 rows=0 loops=1)

421. 0.004 1.464 ↓ 0.0 0 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.464..1.464 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
422. 0.524 1.460 ↓ 0.0 0 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=1.460..1.460 rows=0 loops=1)

423. 0.333 0.333 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.018..0.333 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
424. 0.603 0.603 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
425. 0.005 2.983 ↑ 1.0 2 1

Limit (cost=1,746.78..1,746.79 rows=2 width=8) (actual time=2.980..2.983 rows=2 loops=1)

426. 0.011 2.978 ↑ 1.0 2 1

Sort (cost=1,746.78..1,746.79 rows=2 width=8) (actual time=2.978..2.978 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
427. 0.007 2.967 ↓ 1.5 3 1

Unique (cost=1,746.76..1,746.77 rows=2 width=8) (actual time=2.961..2.967 rows=3 loops=1)

428. 0.013 2.960 ↓ 1.5 3 1

Sort (cost=1,746.76..1,746.76 rows=2 width=8) (actual time=2.958..2.960 rows=3 loops=1)

  • Sort Key: fl.id_flight, rl.route_points
  • Sort Method: quicksort Memory: 25kB
429. 0.008 2.947 ↓ 1.5 3 1

Append (cost=873.36..1,746.75 rows=2 width=8) (actual time=1.460..2.947 rows=3 loops=1)

430. 0.003 1.461 ↓ 2.0 2 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.458..1.461 rows=2 loops=1)

431. 0.016 1.458 ↓ 2.0 2 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.457..1.458 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
432. 0.302 1.442 ↓ 8.0 8 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=0.031..1.442 rows=8 loops=1)

433. 0.336 0.336 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.016..0.336 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
434. 0.804 0.804 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone2'::text))
435. 0.002 1.478 ↑ 1.0 1 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.478..1.478 rows=1 loops=1)

436. 0.026 1.476 ↑ 1.0 1 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.476..1.476 rows=1 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
437. 0.515 1.450 ↓ 21.0 21 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=0.733..1.450 rows=21 loops=1)

438. 0.332 0.332 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.016..0.332 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
439. 0.603 0.603 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'global'::text))
440. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=4)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
441. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=4)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
442. 0.018 6.476 ↓ 4.0 4 1

Nested Loop (cost=3,493.76..3,538.42 rows=1 width=4) (actual time=6.420..6.476 rows=4 loops=1)

443. 0.017 6.442 ↓ 4.0 4 1

Nested Loop (cost=3,493.76..3,529.79 rows=1 width=8) (actual time=6.410..6.442 rows=4 loops=1)

444. 0.005 6.405 ↑ 1.0 4 1

Limit (cost=3,493.76..3,493.77 rows=4 width=8) (actual time=6.399..6.405 rows=4 loops=1)

445. 0.023 6.400 ↑ 1.0 4 1

Sort (cost=3,493.76..3,493.77 rows=4 width=8) (actual time=6.397..6.400 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
446. 0.012 6.377 ↓ 1.5 6 1

HashAggregate (cost=3,493.68..3,493.72 rows=4 width=8) (actual time=6.374..6.377 rows=6 loops=1)

447. 0.013 6.365 ↓ 1.5 6 1

Append (cost=873.36..3,493.66 rows=4 width=8) (actual time=1.843..6.365 rows=6 loops=1)

448. 0.008 1.846 ↓ 4.0 4 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.839..1.846 rows=4 loops=1)

449. 0.120 1.838 ↓ 4.0 4 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.836..1.838 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
450. 0.552 1.718 ↓ 119.0 119 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=0.083..1.718 rows=119 loops=1)

451. 0.362 0.362 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.018..0.362 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
452. 0.804 0.804 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
453. 0.004 4.506 ↑ 1.5 2 1

Limit (cost=2,620.25..2,620.26 rows=3 width=8) (actual time=4.502..4.506 rows=2 loops=1)

454. 0.011 4.502 ↑ 1.5 2 1

Sort (cost=2,620.25..2,620.26 rows=3 width=8) (actual time=4.500..4.502 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
455. 0.007 4.491 ↑ 1.5 2 1

HashAggregate (cost=2,620.20..2,620.23 rows=3 width=8) (actual time=4.489..4.491 rows=2 loops=1)

456. 0.006 4.484 ↑ 1.5 2 1

Append (cost=873.36..2,620.18 rows=3 width=8) (actual time=4.478..4.484 rows=2 loops=1)

457. 0.002 1.432 ↓ 0.0 0 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.432..1.432 rows=0 loops=1)

458. 0.007 1.430 ↓ 0.0 0 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.430..1.430 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
459. 0.493 1.423 ↓ 0.0 0 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=1.423..1.423 rows=0 loops=1)

460. 0.327 0.327 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.018..0.327 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
461. 0.603 0.603 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
462. 0.005 3.046 ↑ 1.0 2 1

Limit (cost=1,746.78..1,746.79 rows=2 width=8) (actual time=3.043..3.046 rows=2 loops=1)

463. 0.011 3.041 ↑ 1.0 2 1

Sort (cost=1,746.78..1,746.79 rows=2 width=8) (actual time=3.041..3.041 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
464. 0.006 3.030 ↓ 1.5 3 1

Unique (cost=1,746.76..1,746.77 rows=2 width=8) (actual time=3.023..3.030 rows=3 loops=1)

465. 0.015 3.024 ↓ 1.5 3 1

Sort (cost=1,746.76..1,746.76 rows=2 width=8) (actual time=3.021..3.024 rows=3 loops=1)

  • Sort Key: fl.id_flight, rl.route_points
  • Sort Method: quicksort Memory: 25kB
466. 0.006 3.009 ↓ 1.5 3 1

Append (cost=873.36..1,746.75 rows=2 width=8) (actual time=1.497..3.009 rows=3 loops=1)

467. 0.004 1.498 ↓ 2.0 2 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.495..1.498 rows=2 loops=1)

468. 0.015 1.494 ↓ 2.0 2 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.493..1.494 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
469. 0.350 1.479 ↓ 8.0 8 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=0.031..1.479 rows=8 loops=1)

470. 0.325 0.325 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.017..0.325 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
471. 0.804 0.804 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone2'::text))
472. 0.003 1.505 ↑ 1.0 1 1

Limit (cost=873.36..873.36 rows=1 width=8) (actual time=1.504..1.505 rows=1 loops=1)

473. 0.032 1.502 ↑ 1.0 1 1

Sort (cost=873.36..873.36 rows=1 width=8) (actual time=1.502..1.502 rows=1 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
474. 0.536 1.470 ↓ 21.0 21 1

Nested Loop (cost=0.00..873.35 rows=1 width=8) (actual time=0.738..1.470 rows=21 loops=1)

475. 0.331 0.331 ↓ 3.2 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=63 width=4) (actual time=0.017..0.331 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid AND (glider_class = 'A'::bpchar))
476. 0.603 0.603 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'global'::text))
477. 0.020 0.020 ↑ 1.0 1 4

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=4)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
478. 0.016 0.016 ↑ 1.0 1 4

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=4)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
479. 0.012 4.211 ↑ 1.0 1 1

Aggregate (cost=1,387.57..1,387.59 rows=1 width=4) (actual time=4.210..4.211 rows=1 loops=1)

480.          

CTE flights

481. 0.312 4.167 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,387.51 rows=1 width=66) (actual time=4.167..4.167 rows=0 loops=1)

  • Join Filter: (SubPlan 24)
482. 0.534 2.961 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,304.50 rows=1 width=50) (actual time=0.042..2.961 rows=149 loops=1)

483. 0.536 1.682 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,295.94 rows=1 width=41) (actual time=0.026..1.682 rows=149 loops=1)

484. 0.338 0.338 ↓ 1.8 202 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=110 width=31) (actual time=0.015..0.338 rows=202 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND (id_site IS NOT NULL) AND (glider_class_fai = 3))
485. 0.808 0.808 ↑ 1.0 1 202

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=10) (actual time=0.003..0.004 rows=1 loops=202)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
486. 0.745 0.745 ↑ 1.0 1 149

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..8.55 rows=1 width=17) (actual time=0.004..0.005 rows=1 loops=149)

  • Index Cond: (id = fl.id_flight)
487. 0.894 0.894 ↓ 0.0 0 149

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes_vp5 (cost=0.00..16.59 rows=1 width=20) (actual time=0.006..0.006 rows=0 loops=149)

  • Index Cond: (id = flights.route_vp5)
  • Filter: (route_length >= 100,000)
488.          

SubPlan (for Nested Loop)

489. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=66.40..66.41 rows=1 width=4) (never executed)

490. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..66.39 rows=1 width=4) (never executed)

491. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..49.79 rows=1 width=8) (never executed)

492. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..41.22 rows=1 width=8) (never executed)

493. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on xc_flights fl (cost=28.21..32.23 rows=1 width=4) (never executed)

  • Recheck Cond: ((id_pilot = pilots.id) AND (id_site = fl.id_site))
  • Filter: (flight_is_active AND (glider_class_fai = 3))
494. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=28.21..28.21 rows=1 width=0) (never executed)

495. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on xc_flights_flight_is_active_id_pilot (cost=0.00..6.01 rows=133 width=0) (never executed)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
496. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on xc_flights_id_site (cost=0.00..21.95 rows=703 width=0) (never executed)

  • Index Cond: (id_site = fl.id_site)
497. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
498. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..8.55 rows=1 width=8) (never executed)

  • Index Cond: (id = fl.id_flight)
499. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes_vp5 (cost=0.00..16.59 rows=1 width=4) (never executed)

  • Index Cond: (id = flights.route_vp5)
  • Filter: ((route_length >= 100,000) AND (route_points > routes_vp5.route_points))
500.          

Initplan (for Aggregate)

501. 0.001 0.028 ↓ 0.0 0 1

Limit (cost=0.03..0.04 rows=1 width=8) (actual time=0.028..0.028 rows=0 loops=1)

502. 0.025 0.027 ↓ 0.0 0 1

Sort (cost=0.03..0.04 rows=1 width=8) (actual time=0.027..0.027 rows=0 loops=1)

  • Sort Key: flights.route_points
  • Sort Method: quicksort Memory: 25kB
503. 0.002 0.002 ↓ 0.0 0 1

CTE Scan on flights (cost=0.00..0.02 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=1)

504. 4.171 4.171 ↓ 0.0 0 1

CTE Scan on flights (cost=0.00..0.02 rows=1 width=4) (actual time=4.171..4.171 rows=0 loops=1)

505. 0.007 60,216.761 ↑ 1.0 1 1

Aggregate (cost=1,906,990.00..1,906,990.01 rows=1 width=4) (actual time=60,216.760..60,216.761 rows=1 loops=1)

506. 0.014 60,216.754 ↓ 4.0 4 1

Nested Loop (cost=1,906,945.34..1,906,990.00 rows=1 width=4) (actual time=60,216.679..60,216.754 rows=4 loops=1)

507. 0.019 60,216.708 ↓ 4.0 4 1

Nested Loop (cost=1,906,945.34..1,906,981.37 rows=1 width=12) (actual time=60,216.665..60,216.708 rows=4 loops=1)

508. 0.008 60,216.657 ↑ 1.0 4 1

Limit (cost=1,906,945.34..1,906,945.35 rows=4 width=8) (actual time=60,216.650..60,216.657 rows=4 loops=1)

509. 0.018 60,216.649 ↑ 1.0 4 1

Sort (cost=1,906,945.34..1,906,945.35 rows=4 width=8) (actual time=60,216.648..60,216.649 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
510. 0.020 60,216.631 ↓ 1.5 6 1

HashAggregate (cost=1,906,945.26..1,906,945.30 rows=4 width=8) (actual time=60,216.626..60,216.631 rows=6 loops=1)

511. 0.011 60,216.611 ↓ 1.5 6 1

Append (cost=476,736.25..1,906,945.24 rows=4 width=8) (actual time=47,013.678..60,216.611 rows=6 loops=1)

512. 0.005 47,013.682 ↓ 4.0 4 1

Limit (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=47,013.676..47,013.682 rows=4 loops=1)

513. 0.521 47,013.677 ↓ 4.0 4 1

Sort (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=47,013.674..47,013.677 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
514. 1,100.167 47,013.156 ↓ 119.0 119 1

Nested Loop (cost=144,401.50..476,736.24 rows=1 width=8) (actual time=1,452.771..47,013.156 rows=119 loops=1)

  • Join Filter: (fl.id_flight = flgs.flight)
515. 0.828 3.860 ↓ 119.0 119 1

Nested Loop (cost=0.00..1,476.15 rows=1 width=12) (actual time=0.079..3.860 rows=119 loops=1)

516. 0.821 0.821 ↓ 1.5 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=130 width=4) (actual time=0.014..0.821 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid)
517. 2.211 2.211 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.009..0.011 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
518. 5,408.907 45,909.129 ↓ 1.4 13,041 119

Nested Loop (cost=144,401.50..475,143.43 rows=9,333 width=12) (actual time=13.263..385.791 rows=13,041 loops=119)

519. 5,462.457 32,740.827 ↓ 1.4 13,041 119

Nested Loop (cost=144,401.50..296,417.12 rows=9,386 width=16) (actual time=13.248..275.133 rows=13,041 loops=119)

520. 5,936.791 21,032.298 ↓ 1.4 13,122 119

Nested Loop (cost=144,401.50..245,271.06 rows=9,688 width=20) (actual time=13.236..176.742 rows=13,122 loops=119)

521. 4,720.758 8,849.435 ↓ 1.4 13,122 119

Hash Right Join (cost=144,401.50..176,139.36 rows=9,695 width=12) (actual time=13.222..74.365 rows=13,122 loops=119)

  • Hash Cond: (flgs.flight = flights.id)
  • Filter: ((NOT flgs.in_fai_competition) OR (flgs.in_fai_competition IS NULL))
522. 2,649.892 3,094.119 ↓ 1.0 15,872 119

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.75..32,303.62 rows=15,272 width=5) (actual time=4.523..26.001 rows=15,872 loops=119)

  • Recheck Cond: (league = 1,821)
523. 444.227 444.227 ↓ 2.5 37,863 119

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=3.733..3.733 rows=37,863 loops=119)

  • Index Cond: (league = 1,821)
524. 13.032 1,034.558 ↓ 1.4 13,206 1

Hash (cost=143,656.57..143,656.57 rows=9,695 width=12) (actual time=1,034.558..1,034.558 rows=13,206 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 568kB
525. 35.231 1,021.526 ↓ 1.4 13,206 1

Nested Loop (cost=24,170.20..143,656.57 rows=9,695 width=12) (actual time=798.063..1,021.526 rows=13,206 loops=1)

526. 60.086 887.756 ↓ 1.2 14,077 1

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (actual time=798.018..887.756 rows=14,077 loops=1)

  • Hash Cond: (flgs.pilot_league = plgs.id)
527. 30.642 34.892 ↓ 1.1 14,088 1

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (actual time=5.045..34.892 rows=14,088 loops=1)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
528. 4.250 4.250 ↓ 2.5 37,863 1

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=4.250..4.250 rows=37,863 loops=1)

  • Index Cond: (league = 1,821)
529. 382.459 792.778 ↑ 1.1 458,324 1

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (actual time=792.778..792.778 rows=458,324 loops=1)

  • Buckets: 65,536 Batches: 2 Memory Usage: 8,073kB
530. 410.319 410.319 ↑ 1.1 458,324 1

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (actual time=0.016..410.319 rows=458,324 loops=1)

  • Filter: (is_valid OR (is_valid IS NULL))
531. 98.539 98.539 ↑ 1.0 1 14,077

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.05 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=14,077)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
532. 6,246.072 6,246.072 ↑ 1.0 1 1,561,518

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.12 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=1,561,518)

  • Index Cond: (id = flgs.flight)
533. 6,246.072 6,246.072 ↑ 1.0 1 1,561,518

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.27 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1,561,518)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
534. 7,759.395 7,759.395 ↑ 1.0 1 1,551,879

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1,551,879)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
535. 0.007 13,202.918 ↑ 1.5 2 1

Limit (cost=1,430,208.93..1,430,208.94 rows=3 width=8) (actual time=13,202.914..13,202.918 rows=2 loops=1)

536. 0.016 13,202.911 ↑ 1.5 2 1

Sort (cost=1,430,208.93..1,430,208.94 rows=3 width=8) (actual time=13,202.911..13,202.911 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
537. 0.012 13,202.895 ↑ 1.5 2 1

HashAggregate (cost=1,430,208.88..1,430,208.91 rows=3 width=8) (actual time=13,202.894..13,202.895 rows=2 loops=1)

538. 0.008 13,202.883 ↑ 1.5 2 1

Append (cost=476,736.25..1,430,208.87 rows=3 width=8) (actual time=13,202.878..13,202.883 rows=2 loops=1)

539. 0.002 1.815 ↓ 0.0 0 1

Limit (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=1.815..1.815 rows=0 loops=1)

540. 0.006 1.813 ↓ 0.0 0 1

Sort (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=1.813..1.813 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
541. 0.002 1.807 ↓ 0.0 0 1

Nested Loop (cost=144,401.50..476,736.24 rows=1 width=8) (actual time=1.807..1.807 rows=0 loops=1)

  • Join Filter: (fl.id_flight = flgs.flight)
542. 0.348 1.805 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,476.15 rows=1 width=12) (actual time=1.805..1.805 rows=0 loops=1)

543. 0.452 0.452 ↓ 1.5 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=130 width=4) (actual time=0.021..0.452 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid)
544. 1.005 1.005 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
545. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=144,401.50..475,143.43 rows=9,333 width=12) (never executed)

546. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=144,401.50..296,417.12 rows=9,386 width=16) (never executed)

547. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=144,401.50..245,271.06 rows=9,688 width=20) (never executed)

548. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=144,401.50..176,139.36 rows=9,695 width=12) (never executed)

  • Hash Cond: (flgs.flight = flights.id)
  • Filter: ((NOT flgs.in_fai_competition) OR (flgs.in_fai_competition IS NULL))
549. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.75..32,303.62 rows=15,272 width=5) (never executed)

  • Recheck Cond: (league = 1,821)
550. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
551. 0.000 0.000 ↓ 0.0 0

Hash (cost=143,656.57..143,656.57 rows=9,695 width=12) (never executed)

552. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,656.57 rows=9,695 width=12) (never executed)

553. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
554. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
555. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
556. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (never executed)

557. 0.000 0.000 ↓ 0.0 0

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (never executed)

  • Filter: (is_valid OR (is_valid IS NULL))
558. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.05 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
559. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.12 rows=1 width=8) (never executed)

  • Index Cond: (id = flgs.flight)
560. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.27 rows=1 width=4) (never executed)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
561. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (never executed)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
562. 0.003 13,201.060 ↑ 1.0 2 1

Limit (cost=953,472.57..953,472.58 rows=2 width=8) (actual time=13,201.058..13,201.060 rows=2 loops=1)

563. 0.012 13,201.057 ↑ 1.0 2 1

Sort (cost=953,472.57..953,472.58 rows=2 width=8) (actual time=13,201.056..13,201.057 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
564. 0.009 13,201.045 ↓ 1.5 3 1

Unique (cost=953,472.55..953,472.56 rows=2 width=8) (actual time=13,201.036..13,201.045 rows=3 loops=1)

565. 0.017 13,201.036 ↓ 1.5 3 1

Sort (cost=953,472.55..953,472.55 rows=2 width=8) (actual time=13,201.034..13,201.036 rows=3 loops=1)

  • Sort Key: fl.id_flight, rl.route_points
  • Sort Method: quicksort Memory: 25kB
566. 0.011 13,201.019 ↓ 1.5 3 1

Append (cost=476,736.25..953,472.54 rows=2 width=8) (actual time=4,083.095..13,201.019 rows=3 loops=1)

567. 0.007 4,083.096 ↓ 2.0 2 1

Limit (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=4,083.092..4,083.096 rows=2 loops=1)

568. 0.036 4,083.089 ↓ 2.0 2 1

Sort (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=4,083.088..4,083.089 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
569. 73.225 4,083.053 ↓ 8.0 8 1

Nested Loop (cost=144,401.50..476,736.24 rows=1 width=8) (actual time=1,366.600..4,083.053 rows=8 loops=1)

  • Join Filter: (fl.id_flight = flgs.flight)
570. 0.456 1.940 ↓ 8.0 8 1

Nested Loop (cost=0.00..1,476.15 rows=1 width=12) (actual time=0.030..1.940 rows=8 loops=1)

571. 0.479 0.479 ↓ 1.5 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=130 width=4) (actual time=0.014..0.479 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid)
572. 1.005 1.005 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone2'::text))
573. 363.752 4,007.888 ↓ 1.4 13,041 8

Nested Loop (cost=144,401.50..475,143.43 rows=9,333 width=12) (actual time=126.937..500.986 rows=13,041 loops=8)

574. 366.688 3,122.496 ↓ 1.4 13,041 8

Nested Loop (cost=144,401.50..296,417.12 rows=9,386 width=16) (actual time=126.922..390.312 rows=13,041 loops=8)

575. 401.240 2,335.904 ↓ 1.4 13,122 8

Nested Loop (cost=144,401.50..245,271.06 rows=9,688 width=20) (actual time=126.909..291.988 rows=13,122 loops=8)

576. 326.941 1,514.760 ↓ 1.4 13,122 8

Hash Right Join (cost=144,401.50..176,139.36 rows=9,695 width=12) (actual time=126.893..189.345 rows=13,122 loops=8)

  • Hash Cond: (flgs.flight = flights.id)
  • Filter: ((NOT flgs.in_fai_competition) OR (flgs.in_fai_competition IS NULL))
577. 178.848 208.528 ↓ 1.0 15,872 8

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.75..32,303.62 rows=15,272 width=5) (actual time=4.474..26.066 rows=15,872 loops=8)

  • Recheck Cond: (league = 1,821)
578. 29.680 29.680 ↓ 2.5 37,863 8

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=3.710..3.710 rows=37,863 loops=8)

  • Index Cond: (league = 1,821)
579. 12.697 979.291 ↓ 1.4 13,206 1

Hash (cost=143,656.57..143,656.57 rows=9,695 width=12) (actual time=979.291..979.291 rows=13,206 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 568kB
580. 44.229 966.594 ↓ 1.4 13,206 1

Nested Loop (cost=24,170.20..143,656.57 rows=9,695 width=12) (actual time=774.731..966.594 rows=13,206 loops=1)

581. 54.636 851.980 ↓ 1.2 14,077 1

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (actual time=774.699..851.980 rows=14,077 loops=1)

  • Hash Cond: (flgs.pilot_league = plgs.id)
582. 23.617 27.411 ↓ 1.1 14,088 1

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (actual time=4.575..27.411 rows=14,088 loops=1)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
583. 3.794 3.794 ↓ 2.5 37,863 1

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=3.794..3.794 rows=37,863 loops=1)

  • Index Cond: (league = 1,821)
584. 381.857 769.933 ↑ 1.1 458,324 1

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (actual time=769.933..769.933 rows=458,324 loops=1)

  • Buckets: 65,536 Batches: 2 Memory Usage: 8,073kB
585. 388.076 388.076 ↑ 1.1 458,324 1

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (actual time=0.005..388.076 rows=458,324 loops=1)

  • Filter: (is_valid OR (is_valid IS NULL))
586. 70.385 70.385 ↑ 1.0 1 14,077

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.05 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=14,077)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
587. 419.904 419.904 ↑ 1.0 1 104,976

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.12 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=104,976)

  • Index Cond: (id = flgs.flight)
588. 419.904 419.904 ↑ 1.0 1 104,976

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.27 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=104,976)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
589. 521.640 521.640 ↑ 1.0 1 104,328

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=104,328)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
590. 0.002 9,117.912 ↑ 1.0 1 1

Limit (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=9,117.912..9,117.912 rows=1 loops=1)

591. 0.105 9,117.910 ↑ 1.0 1 1

Sort (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=9,117.910..9,117.910 rows=1 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
592. 192.422 9,117.805 ↓ 21.0 21 1

Nested Loop (cost=144,401.50..476,736.24 rows=1 width=8) (actual time=1,148.152..9,117.805 rows=21 loops=1)

  • Join Filter: (fl.id_flight = flgs.flight)
593. 0.494 1.958 ↓ 21.0 21 1

Nested Loop (cost=0.00..1,476.15 rows=1 width=12) (actual time=0.749..1.958 rows=21 loops=1)

594. 0.459 0.459 ↓ 1.5 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=130 width=4) (actual time=0.019..0.459 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid)
595. 1.005 1.005 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'global'::text))
596. 958.692 8,923.425 ↓ 1.4 13,041 21

Nested Loop (cost=144,401.50..475,143.43 rows=9,333 width=12) (actual time=51.442..424.925 rows=13,041 loops=21)

597. 969.948 6,595.428 ↓ 1.4 13,041 21

Nested Loop (cost=144,401.50..296,417.12 rows=9,386 width=16) (actual time=51.429..314.068 rows=13,041 loops=21)

598. 1,063.251 4,523.232 ↓ 1.4 13,122 21

Nested Loop (cost=144,401.50..245,271.06 rows=9,688 width=20) (actual time=51.417..215.392 rows=13,122 loops=21)

599. 827.603 2,357.733 ↓ 1.4 13,122 21

Hash Right Join (cost=144,401.50..176,139.36 rows=9,695 width=12) (actual time=51.402..112.273 rows=13,122 loops=21)

  • Hash Cond: (flgs.flight = flights.id)
  • Filter: ((NOT flgs.in_fai_competition) OR (flgs.in_fai_competition IS NULL))
600. 467.061 544.656 ↓ 1.0 15,872 21

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.75..32,303.62 rows=15,272 width=5) (actual time=4.469..25.936 rows=15,872 loops=21)

  • Recheck Cond: (league = 1,821)
601. 77.595 77.595 ↓ 2.5 37,863 21

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=3.695..3.695 rows=37,863 loops=21)

  • Index Cond: (league = 1,821)
602. 12.951 985.474 ↓ 1.4 13,206 1

Hash (cost=143,656.57..143,656.57 rows=9,695 width=12) (actual time=985.474..985.474 rows=13,206 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 568kB
603. 45.275 972.523 ↓ 1.4 13,206 1

Nested Loop (cost=24,170.20..143,656.57 rows=9,695 width=12) (actual time=775.858..972.523 rows=13,206 loops=1)

604. 58.066 856.863 ↓ 1.2 14,077 1

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (actual time=775.829..856.863 rows=14,077 loops=1)

  • Hash Cond: (flgs.pilot_league = plgs.id)
605. 23.934 27.709 ↓ 1.1 14,088 1

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (actual time=4.554..27.709 rows=14,088 loops=1)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
606. 3.775 3.775 ↓ 2.5 37,863 1

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=3.775..3.775 rows=37,863 loops=1)

  • Index Cond: (league = 1,821)
607. 381.116 771.088 ↑ 1.1 458,324 1

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (actual time=771.088..771.088 rows=458,324 loops=1)

  • Buckets: 65,536 Batches: 2 Memory Usage: 8,073kB
608. 389.972 389.972 ↑ 1.1 458,324 1

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (actual time=0.005..389.972 rows=458,324 loops=1)

  • Filter: (is_valid OR (is_valid IS NULL))
609. 70.385 70.385 ↑ 1.0 1 14,077

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.05 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=14,077)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
610. 1,102.248 1,102.248 ↑ 1.0 1 275,562

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.12 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=275,562)

  • Index Cond: (id = flgs.flight)
611. 1,102.248 1,102.248 ↑ 1.0 1 275,562

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.27 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=275,562)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
612. 1,369.305 1,369.305 ↑ 1.0 1 273,861

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=273,861)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
613. 0.032 0.032 ↑ 1.0 1 4

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=4)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
614. 0.032 0.032 ↑ 1.0 1 4

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..8.62 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=4)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
615. 0.010 341.518 ↑ 1.0 1 1

Aggregate (cost=685,224.64..685,224.65 rows=1 width=8) (actual time=341.517..341.518 rows=1 loops=1)

616. 0.178 341.508 ↓ 0.0 0 1

Nested Loop (cost=685,224.18..685,224.64 rows=1 width=8) (actual time=341.508..341.508 rows=0 loops=1)

  • Join Filter: (vw_custom.id = vw_custom.id)
617. 0.247 174.695 ↓ 105.0 105 1

Subquery Scan on vw_custom (cost=342,611.86..342,612.29 rows=1 width=12) (actual time=173.956..174.695 rows=105 loops=1)

  • Filter: (((vw_custom.flgs_xc_area)::text = ANY ('{local,zone1}'::text[])) AND (vw_custom.base > 0) AND (vw_custom.rank = 1))
618. 0.417 174.448 ↓ 17.0 153 1

WindowAgg (cost=342,611.86..342,612.13 rows=9 width=68) (actual time=173.942..174.448 rows=153 loops=1)

619. 0.415 174.031 ↓ 17.0 153 1

Sort (cost=342,611.86..342,611.88 rows=9 width=68) (actual time=173.928..174.031 rows=153 loops=1)

  • Sort Key: fl.id_pilot, (CASE WHEN (rt_3speed.route_length < 25000) THEN 0 WHEN (rt_3speed.route_length < 50000) THEN 25 WHEN (rt_3speed.route_length < 100000) THEN 50 ELSE 100 END), rt_3speed.route_points
  • Sort Method: quicksort Memory: 46kB
620. 0.556 173.616 ↓ 17.0 153 1

Nested Loop (cost=0.00..342,611.72 rows=9 width=68) (actual time=0.195..173.616 rows=153 loops=1)

621. 17.256 171.638 ↓ 17.6 158 1

Nested Loop (cost=0.00..342,550.72 rows=9 width=49) (actual time=0.178..171.638 rows=158 loops=1)

622. 53.191 140.334 ↓ 1.1 14,048 1

Nested Loop (cost=0.00..120,672.09 rows=13,366 width=33) (actual time=0.045..140.334 rows=14,048 loops=1)

623. 30.951 30.951 ↓ 1.1 14,048 1

Index Scan using xc_routes_league on xc_routes rl (cost=0.00..28,496.54 rows=13,366 width=16) (actual time=0.033..30.951 rows=14,048 loops=1)

  • Index Cond: (id_league = 1,821)
  • Filter: (flgs_is_public AND plgs_is_public)
624. 56.192 56.192 ↑ 1.0 1 14,048

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..6.88 rows=1 width=17) (actual time=0.003..0.004 rows=1 loops=14,048)

  • Index Cond: (id = rl.id_flight)
625. 14.048 14.048 ↓ 0.0 0 14,048

Index Scan using zen_xc_routes_pkey on zen_xc_routes rt_3speed (cost=0.00..16.59 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=14,048)

  • Index Cond: (id = flights.route_olc)
626. 1.422 1.422 ↑ 1.0 1 158

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..6.76 rows=1 width=27) (actual time=0.008..0.009 rows=1 loops=158)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
627. 0.105 166.635 ↓ 0.0 0 105

Limit (cost=342,612.32..342,612.33 rows=1 width=12) (actual time=1.587..1.587 rows=0 loops=105)

628. 0.064 166.530 ↓ 0.0 0 105

Sort (cost=342,612.32..342,612.33 rows=1 width=12) (actual time=1.586..1.586 rows=0 loops=105)

  • Sort Key: vw_custom.route_points
  • Sort Method: quicksort Memory: 25kB
629. 0.185 166.466 ↓ 0.0 0 1

Subquery Scan on vw_custom (cost=342,611.86..342,612.31 rows=1 width=12) (actual time=166.466..166.466 rows=0 loops=1)

  • Filter: (((vw_custom.flgs_xc_area)::text = ANY ('{local,zone1}'::text[])) AND (vw_custom.base > 0) AND (vw_custom.rank = 1) AND (vw_custom.pilot = pilots.id))
630. 0.360 166.281 ↓ 17.0 153 1

WindowAgg (cost=342,611.86..342,612.13 rows=9 width=68) (actual time=165.832..166.281 rows=153 loops=1)

631. 0.435 165.921 ↓ 17.0 153 1

Sort (cost=342,611.86..342,611.88 rows=9 width=68) (actual time=165.816..165.921 rows=153 loops=1)

  • Sort Key: fl.id_pilot, (CASE WHEN (rt_3speed.route_length < 25000) THEN 0 WHEN (rt_3speed.route_length < 50000) THEN 25 WHEN (rt_3speed.route_length < 100000) THEN 50 ELSE 100 END), rt_3speed.route_points
  • Sort Method: quicksort Memory: 46kB
632. 0.651 165.486 ↓ 17.0 153 1

Nested Loop (cost=0.00..342,611.72 rows=9 width=68) (actual time=0.188..165.486 rows=153 loops=1)

633. 17.002 163.887 ↓ 17.6 158 1

Nested Loop (cost=0.00..342,550.72 rows=9 width=49) (actual time=0.168..163.887 rows=158 loops=1)

634. 53.600 132.837 ↓ 1.1 14,048 1

Nested Loop (cost=0.00..120,672.09 rows=13,366 width=33) (actual time=0.032..132.837 rows=14,048 loops=1)

635. 23.045 23.045 ↓ 1.1 14,048 1

Index Scan using xc_routes_league on xc_routes rl (cost=0.00..28,496.54 rows=13,366 width=16) (actual time=0.018..23.045 rows=14,048 loops=1)

  • Index Cond: (id_league = 1,821)
  • Filter: (flgs_is_public AND plgs_is_public)
636. 56.192 56.192 ↑ 1.0 1 14,048

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..6.88 rows=1 width=17) (actual time=0.003..0.004 rows=1 loops=14,048)

  • Index Cond: (id = rl.id_flight)
637. 14.048 14.048 ↓ 0.0 0 14,048

Index Scan using zen_xc_routes_pkey on zen_xc_routes rt_3speed (cost=0.00..16.59 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=14,048)

  • Index Cond: (id = flights.route_olc)
638. 0.948 0.948 ↑ 1.0 1 158

Index Scan using xc_flights_id_flight_key on xc_flights fl (cost=0.00..6.76 rows=1 width=27) (actual time=0.005..0.006 rows=1 loops=158)

  • Index Cond: (id_flight = rl.id_flight)
  • Filter: flight_is_active
639. 0.014 4.517 ↑ 1.0 1 1

Aggregate (cost=1,387.57..1,387.59 rows=1 width=4) (actual time=4.516..4.517 rows=1 loops=1)

640.          

CTE flights

641. 0.227 4.485 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,387.51 rows=1 width=66) (actual time=4.485..4.485 rows=0 loops=1)

  • Join Filter: (SubPlan 30)
642. 0.567 3.364 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,304.50 rows=1 width=50) (actual time=0.060..3.364 rows=149 loops=1)

643. 0.573 2.052 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,295.94 rows=1 width=41) (actual time=0.045..2.052 rows=149 loops=1)

644. 0.469 0.469 ↓ 1.8 202 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=110 width=31) (actual time=0.028..0.469 rows=202 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND (id_site IS NOT NULL) AND (glider_class_fai = 3))
645. 1.010 1.010 ↑ 1.0 1 202

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=10) (actual time=0.004..0.005 rows=1 loops=202)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
646. 0.745 0.745 ↑ 1.0 1 149

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..8.55 rows=1 width=17) (actual time=0.004..0.005 rows=1 loops=149)

  • Index Cond: (id = fl.id_flight)
647. 0.894 0.894 ↓ 0.0 0 149

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes_vp5 (cost=0.00..16.59 rows=1 width=20) (actual time=0.006..0.006 rows=0 loops=149)

  • Index Cond: (id = flights.route_vp5)
  • Filter: (route_length >= 200,000)
648.          

SubPlan (for Nested Loop)

649. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=66.40..66.41 rows=1 width=4) (never executed)

650. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..66.39 rows=1 width=4) (never executed)

651. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..49.79 rows=1 width=8) (never executed)

652. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..41.22 rows=1 width=8) (never executed)

653. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on xc_flights fl (cost=28.21..32.23 rows=1 width=4) (never executed)

  • Recheck Cond: ((id_pilot = pilots.id) AND (id_site = fl.id_site))
  • Filter: (flight_is_active AND (glider_class_fai = 3))
654. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=28.21..28.21 rows=1 width=0) (never executed)

655. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on xc_flights_flight_is_active_id_pilot (cost=0.00..6.01 rows=133 width=0) (never executed)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
656. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on xc_flights_id_site (cost=0.00..21.95 rows=703 width=0) (never executed)

  • Index Cond: (id_site = fl.id_site)
657. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
658. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..8.55 rows=1 width=8) (never executed)

  • Index Cond: (id = fl.id_flight)
659. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes_vp5 (cost=0.00..16.59 rows=1 width=4) (never executed)

  • Index Cond: (id = flights.route_vp5)
  • Filter: ((route_length >= 200,000) AND (route_points > routes_vp5.route_points))
660.          

Initplan (for Aggregate)

661. 0.003 0.014 ↓ 0.0 0 1

Limit (cost=0.03..0.04 rows=1 width=8) (actual time=0.014..0.014 rows=0 loops=1)

662. 0.010 0.011 ↓ 0.0 0 1

Sort (cost=0.03..0.04 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Sort Key: flights.route_points
  • Sort Method: quicksort Memory: 25kB
663. 0.001 0.001 ↓ 0.0 0 1

CTE Scan on flights (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

664. 4.489 4.489 ↓ 0.0 0 1

CTE Scan on flights (cost=0.00..0.02 rows=1 width=4) (actual time=4.489..4.489 rows=0 loops=1)

665. 0.244 3.671 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,387.51 rows=1 width=4) (actual time=3.671..3.671 rows=0 loops=1)

  • Join Filter: (SubPlan 34)
666. 0.496 2.831 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,304.50 rows=1 width=12) (actual time=0.041..2.831 rows=149 loops=1)

667. 0.584 1.739 ↓ 149.0 149 1

Nested Loop (cost=0.00..1,295.94 rows=1 width=12) (actual time=0.030..1.739 rows=149 loops=1)

668. 0.347 0.347 ↓ 1.8 202 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=110 width=8) (actual time=0.018..0.347 rows=202 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND (id_site IS NOT NULL) AND (glider_class_fai = 3))
669. 0.808 0.808 ↑ 1.0 1 202

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=202)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
670. 0.596 0.596 ↑ 1.0 1 149

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..8.55 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=149)

  • Index Cond: (id = fl.id_flight)
671. 0.596 0.596 ↓ 0.0 0 149

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes_vp5 (cost=0.00..16.59 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=149)

  • Index Cond: (id = flights.route_vp5)
  • Filter: (route_length >= 100,000)
672.          

SubPlan (for Nested Loop)

673. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=66.40..66.41 rows=1 width=4) (never executed)

674. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..66.39 rows=1 width=4) (never executed)

675. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..49.79 rows=1 width=8) (never executed)

676. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.21..41.22 rows=1 width=8) (never executed)

677. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on xc_flights fl (cost=28.21..32.23 rows=1 width=4) (never executed)

  • Recheck Cond: ((id_pilot = pilots.id) AND (id_site = fl.id_site))
  • Filter: (flight_is_active AND (glider_class_fai = 3))
678. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=28.21..28.21 rows=1 width=0) (never executed)

679. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on xc_flights_flight_is_active_id_pilot (cost=0.00..6.01 rows=133 width=0) (never executed)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
680. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on xc_flights_id_site (cost=0.00..21.95 rows=703 width=0) (never executed)

  • Index Cond: (id_site = fl.id_site)
681. 0.000 0.000 ↓ 0.0 0

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=4) (never executed)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public)
682. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..8.55 rows=1 width=8) (never executed)

  • Index Cond: (id = fl.id_flight)
683. 0.000 0.000 ↓ 0.0 0

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes_vp5 (cost=0.00..16.59 rows=1 width=4) (never executed)

  • Index Cond: (id = flights.route_vp5)
  • Filter: ((route_length >= 100,000) AND (route_points > routes_vp5.route_points))
684. 0.014 60,225.870 ↓ 4.0 4 1

Nested Loop (cost=1,906,945.34..1,906,990.00 rows=1 width=4) (actual time=60,225.797..60,225.870 rows=4 loops=1)

685. 0.016 60,225.824 ↓ 4.0 4 1

Nested Loop (cost=1,906,945.34..1,906,981.37 rows=1 width=8) (actual time=60,225.783..60,225.824 rows=4 loops=1)

686. 0.004 60,225.772 ↑ 1.0 4 1

Limit (cost=1,906,945.34..1,906,945.35 rows=4 width=8) (actual time=60,225.767..60,225.772 rows=4 loops=1)

687. 0.024 60,225.768 ↑ 1.0 4 1

Sort (cost=1,906,945.34..1,906,945.35 rows=4 width=8) (actual time=60,225.765..60,225.768 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
688. 0.019 60,225.744 ↓ 1.5 6 1

HashAggregate (cost=1,906,945.26..1,906,945.30 rows=4 width=8) (actual time=60,225.740..60,225.744 rows=6 loops=1)

689. 0.013 60,225.725 ↓ 1.5 6 1

Append (cost=476,736.25..1,906,945.24 rows=4 width=8) (actual time=46,886.642..60,225.725 rows=6 loops=1)

690. 0.007 46,886.646 ↓ 4.0 4 1

Limit (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=46,886.639..46,886.646 rows=4 loops=1)

691. 0.511 46,886.639 ↓ 4.0 4 1

Sort (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=46,886.636..46,886.639 rows=4 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: top-N heapsort Memory: 25kB
692. 1,104.511 46,886.128 ↓ 119.0 119 1

Nested Loop (cost=144,401.50..476,736.24 rows=1 width=8) (actual time=1,387.619..46,886.128 rows=119 loops=1)

  • Join Filter: (fl.id_flight = flgs.flight)
693. 0.837 3.864 ↓ 119.0 119 1

Nested Loop (cost=0.00..1,476.15 rows=1 width=12) (actual time=0.084..3.864 rows=119 loops=1)

694. 0.816 0.816 ↓ 1.5 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=130 width=4) (actual time=0.014..0.816 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid)
695. 2.211 2.211 ↑ 1.0 1 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'local'::text))
696. 5,374.278 45,777.753 ↓ 1.4 13,041 119

Nested Loop (cost=144,401.50..475,143.43 rows=9,333 width=12) (actual time=12.825..384.687 rows=13,041 loops=119)

697. 5,471.858 32,644.080 ↓ 1.4 13,041 119

Nested Loop (cost=144,401.50..296,417.12 rows=9,386 width=16) (actual time=12.812..274.320 rows=13,041 loops=119)

698. 5,988.794 20,926.150 ↓ 1.4 13,122 119

Nested Loop (cost=144,401.50..245,271.06 rows=9,688 width=20) (actual time=12.800..175.850 rows=13,122 loops=119)

699. 4,632.235 8,691.284 ↓ 1.4 13,122 119

Hash Right Join (cost=144,401.50..176,139.36 rows=9,695 width=12) (actual time=12.785..73.036 rows=13,122 loops=119)

  • Hash Cond: (flgs.flight = flights.id)
  • Filter: ((NOT flgs.in_fai_competition) OR (flgs.in_fai_competition IS NULL))
700. 2,630.019 3,066.987 ↓ 1.0 15,872 119

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.75..32,303.62 rows=15,272 width=5) (actual time=4.444..25.773 rows=15,872 loops=119)

  • Recheck Cond: (league = 1,821)
701. 436.968 436.968 ↓ 2.5 37,863 119

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=3.672..3.672 rows=37,863 loops=119)

  • Index Cond: (league = 1,821)
702. 12.771 992.062 ↓ 1.4 13,206 1

Hash (cost=143,656.57..143,656.57 rows=9,695 width=12) (actual time=992.062..992.062 rows=13,206 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 568kB
703. 46.220 979.291 ↓ 1.4 13,206 1

Nested Loop (cost=24,170.20..143,656.57 rows=9,695 width=12) (actual time=782.839..979.291 rows=13,206 loops=1)

704. 56.656 862.686 ↓ 1.2 14,077 1

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (actual time=782.807..862.686 rows=14,077 loops=1)

  • Hash Cond: (flgs.pilot_league = plgs.id)
705. 24.196 28.003 ↓ 1.1 14,088 1

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (actual time=4.589..28.003 rows=14,088 loops=1)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
706. 3.807 3.807 ↓ 2.5 37,863 1

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (actual time=3.807..3.807 rows=37,863 loops=1)

  • Index Cond: (league = 1,821)
707. 387.355 778.027 ↑ 1.1 458,324 1

Hash (cost=15,607.45..15,607.45 rows=483,890 width=4) (actual time=778.027..778.027 rows=458,324 loops=1)

  • Buckets: 65,536 Batches: 2 Memory Usage: 8,073kB
708. 390.672 390.672 ↑ 1.1 458,324 1

Seq Scan on zen_xc_pilots_leagues plgs (cost=0.00..15,607.45 rows=483,890 width=4) (actual time=0.007..390.672 rows=458,324 loops=1)

  • Filter: (is_valid OR (is_valid IS NULL))
709. 70.385 70.385 ↑ 1.0 1 14,077

Index Scan using zen_xc_flights_pkey on zen_xc_flights flights (cost=0.00..7.05 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=14,077)

  • Index Cond: (id = flgs.flight)
  • Filter: ((NOT is_deleted) AND is_active AND (flight_type = 1) AND (status_optimalization = 3) AND (status_user_data = 3) AND (fai_class = 3))
710. 6,246.072 6,246.072 ↑ 1.0 1 1,561,518

Index Scan using zen_xc_flights_pkey on zen_xc_flights f (cost=0.00..7.12 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1,561,518)

  • Index Cond: (id = flgs.flight)
711. 6,246.072 6,246.072 ↑ 1.0 1 1,561,518

Index Scan using zen_xc_tracklogs_pkey on zen_xc_tracklogs t (cost=0.00..5.27 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1,561,518)

  • Index Cond: (id = f.tracklog)
  • Filter: is_valid
712. 7,759.395 7,759.395 ↑ 1.0 1 1,551,879

Index Scan using zen_xc_routes_pkey on zen_xc_routes routes (cost=0.00..19.03 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1,551,879)

  • Index Cond: (id = flgs.route_league)
  • Filter: (route_length >= 0)
713. 0.004 13,339.066 ↑ 1.5 2 1

Limit (cost=1,430,208.93..1,430,208.94 rows=3 width=8) (actual time=13,339.062..13,339.066 rows=2 loops=1)

714. 0.021 13,339.062 ↑ 1.5 2 1

Sort (cost=1,430,208.93..1,430,208.94 rows=3 width=8) (actual time=13,339.060..13,339.062 rows=2 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
715. 0.011 13,339.041 ↑ 1.5 2 1

HashAggregate (cost=1,430,208.88..1,430,208.91 rows=3 width=8) (actual time=13,339.039..13,339.041 rows=2 loops=1)

716. 0.008 13,339.030 ↑ 1.5 2 1

Append (cost=476,736.25..1,430,208.87 rows=3 width=8) (actual time=13,339.025..13,339.030 rows=2 loops=1)

717. 0.002 1.759 ↓ 0.0 0 1

Limit (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=1.759..1.759 rows=0 loops=1)

718. 0.006 1.757 ↓ 0.0 0 1

Sort (cost=476,736.25..476,736.26 rows=1 width=8) (actual time=1.757..1.757 rows=0 loops=1)

  • Sort Key: rl.route_points
  • Sort Method: quicksort Memory: 25kB
719. 0.002 1.751 ↓ 0.0 0 1

Nested Loop (cost=144,401.50..476,736.24 rows=1 width=8) (actual time=1.751..1.751 rows=0 loops=1)

  • Join Filter: (fl.id_flight = flgs.flight)
720. 0.498 1.749 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,476.15 rows=1 width=12) (actual time=1.749..1.749 rows=0 loops=1)

721. 0.447 0.447 ↓ 1.5 201 1

Index Scan using xc_flights_flight_is_active_id_pilot on xc_flights fl (cost=0.00..306.53 rows=130 width=4) (actual time=0.020..0.447 rows=201 loops=1)

  • Index Cond: ((flight_is_active = true) AND (id_pilot = pilots.id))
  • Filter: (flight_is_active AND tracklog_is_valid)
722. 0.804 0.804 ↓ 0.0 0 201

Index Scan using xc_routes_flight_league on xc_routes rl (cost=0.00..8.98 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=201)

  • Index Cond: ((id_flight = fl.id_flight) AND (id_league = 1,821))
  • Filter: (flgs_is_public AND plgs_is_public AND ((flgs_xc_area)::text = 'zone1'::text))
723. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=144,401.50..475,143.43 rows=9,333 width=12) (never executed)

724. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=144,401.50..296,417.12 rows=9,386 width=16) (never executed)

725. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=144,401.50..245,271.06 rows=9,688 width=20) (never executed)

726. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=144,401.50..176,139.36 rows=9,695 width=12) (never executed)

  • Hash Cond: (flgs.flight = flights.id)
  • Filter: ((NOT flgs.in_fai_competition) OR (flgs.in_fai_competition IS NULL))
727. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.75..32,303.62 rows=15,272 width=5) (never executed)

  • Recheck Cond: (league = 1,821)
728. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on fki_zen_xc_flights_leagues_league (cost=0.00..619.93 rows=15,272 width=0) (never executed)

  • Index Cond: (league = 1,821)
729. 0.000 0.000 ↓ 0.0 0

Hash (cost=143,656.57..143,656.57 rows=9,695 width=12) (never executed)

730. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=24,170.20..143,656.57 rows=9,695 width=12) (never executed)

731. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=24,170.20..58,083.97 rows=12,113 width=8) (never executed)

  • Hash Cond: (flgs.pilot_league = plgs.id)
732. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on zen_xc_flights_leagues flgs (cost=623.12..32,302.99 rows=12,770 width=12) (never executed)

  • Recheck Cond: (league = 1,821)
  • Filter: (is_active AND (is_valid OR (is_valid IS NULL)))
733. 0.000 0.000 ↓ 0.0 0