explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Iq1T : appointment search everything using trailer subqueries, filter_value='hi'

Settings
# exclusive inclusive rows x rows loops node
1. 9.014 30,061.560 ↑ 1.0 10 1

Limit (cost=451,557.15..451,557.17 rows=10 width=368) (actual time=30,056.680..30,061.560 rows=10 loops=1)

2. 14.528 30,052.546 ↑ 923.4 510 1

Sort (cost=451,555.90..452,733.22 rows=470,929 width=368) (actual time=30,047.426..30,052.546 rows=510 loops=1)

  • Sort Key: appointments.id DESC
  • Sort Method: top-N heapsort Memory: 296kB
3. 21.711 30,038.018 ↑ 459.9 1,024 1

Unique (cost=397,412.36..423,313.45 rows=470,929 width=368) (actual time=30,004.255..30,038.018 rows=1,024 loops=1)

4. 30.870 30,016.307 ↑ 341.0 1,381 1

Sort (cost=397,412.36..398,589.68 rows=470,929 width=368) (actual time=30,004.219..30,016.307 rows=1,381 loops=1)

  • Sort Key: appointments.id, appointments.appointment_type, appointments.update_time, appointments.tms_id, appointments.tms_source, appointments.site_id, appointments.tractor_id, appointments.gate_pass_number, appointments.gp_open_time, appointments.gp_close_time, appointments.gp_expiration, appointments.gp_close_type, tractors.name, tractors.tractor_state, tractors.tractor_country, tractors.license_plate, tractors.carrier_id, carriers.name, carriers.carrier_code, trailers.name, trailers_1.name
  • Sort Method: quicksort Memory: 415kB
5. 28.303 29,985.437 ↑ 341.0 1,381 1

Append (cost=318.28..195,293.72 rows=470,929 width=368) (actual time=214.269..29,985.437 rows=1,381 loops=1)

6. 0.070 214.503 ↑ 1.6 8 1

Unique (cost=318.28..318.96 rows=13 width=253) (actual time=214.255..214.503 rows=8 loops=1)

7. 0.364 214.433 ↑ 1.1 12 1

Sort (cost=318.28..318.31 rows=13 width=253) (actual time=214.235..214.433 rows=12 loops=1)

  • Sort Key: appointments.id, appointments.appointment_type, appointments.update_time, appointments.tms_id, appointments.tms_source, appointments.tractor_id, appointments.gate_pass_number, appointments.gp_open_time, appointments.gp_close_time, appointments.gp_expiration, appointments.gp_close_type, tractors.name, tractors.tractor_state, tractors.tractor_country, tractors.license_plate, tractors.carrier_id, carriers.name, carriers.carrier_code, trailers.name, trailers_1.name
  • Sort Method: quicksort Memory: 28kB
8. 0.247 214.069 ↑ 1.1 12 1

Hash Left Join (cost=294.86..318.04 rows=13 width=253) (actual time=201.649..214.069 rows=12 loops=1)

  • Hash Cond: (tractors.carrier_id = carriers.id)
9. 0.280 213.152 ↑ 1.1 12 1

Nested Loop Left Join (cost=293.25..316.39 rows=13 width=189) (actual time=200.941..213.152 rows=12 loops=1)

10. 6.028 212.668 ↑ 1.1 12 1

Hash Right Join (cost=292.97..309.38 rows=13 width=148) (actual time=200.823..212.668 rows=12 loops=1)

  • Hash Cond: (appointments_1.id = appointments.id)
11. 12.641 86.019 ↑ 1.0 687 1

HashAggregate (cost=106.57..113.44 rows=687 width=24) (actual time=80.034..86.019 rows=687 loops=1)

  • Group Key: appointments_1.id, trailers.name
12. 12.067 73.378 ↑ 1.0 687 1

Hash Join (cost=71.42..103.14 rows=687 width=24) (actual time=42.558..73.378 rows=687 loops=1)

  • Hash Cond: (assignments_1.trailer_id = trailers.id)
13. 12.707 38.863 ↑ 1.0 687 1

Hash Join (cost=33.09..62.99 rows=687 width=8) (actual time=20.065..38.863 rows=687 loops=1)

  • Hash Cond: (assignments_1.appointment_id = appointments_1.id)
14. 6.286 6.286 ↑ 1.0 687 1

Seq Scan on assignments assignments_1 (cost=0.00..28.09 rows=687 width=8) (actual time=0.142..6.286 rows=687 loops=1)

  • Filter: (direction = 'Inbound'::trailerdirection)
  • Rows Removed by Filter: 680
15. 10.205 19.870 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=19.855..19.870 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
16. 9.665 9.665 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_1 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.019..9.665 rows=1,026 loops=1)

17. 11.614 22.448 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=22.434..22.448 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
18. 10.834 10.834 ↑ 1.0 1,126 1

Seq Scan on trailers (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.019..10.834 rows=1,126 loops=1)

19. 0.289 120.621 ↑ 1.1 12 1

Hash (cost=186.24..186.24 rows=13 width=128) (actual time=120.609..120.621 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
20. 7.209 120.332 ↑ 1.1 12 1

Hash Right Join (cost=170.00..186.24 rows=13 width=128) (actual time=107.691..120.332 rows=12 loops=1)

  • Hash Cond: (appointments_2.id = appointments.id)
21. 13.299 89.606 ↑ 1.0 680 1

HashAggregate (cost=106.50..113.30 rows=680 width=24) (actual time=83.102..89.606 rows=680 loops=1)

  • Group Key: appointments_2.id, trailers_1.name
22. 12.800 76.307 ↑ 1.0 680 1

Hash Join (cost=71.42..103.10 rows=680 width=24) (actual time=44.075..76.307 rows=680 loops=1)

  • Hash Cond: (assignments_2.trailer_id = trailers_1.id)
23. 13.068 39.921 ↑ 1.0 680 1

Hash Join (cost=33.09..62.97 rows=680 width=8) (actual time=20.435..39.921 rows=680 loops=1)

  • Hash Cond: (assignments_2.appointment_id = appointments_2.id)
24. 6.491 6.491 ↑ 1.0 680 1

Seq Scan on assignments assignments_2 (cost=0.00..28.09 rows=680 width=8) (actual time=0.018..6.491 rows=680 loops=1)

  • Filter: (direction = 'Outbound'::trailerdirection)
  • Rows Removed by Filter: 687
25. 10.441 20.362 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=20.350..20.362 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
26. 9.921 9.921 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_2 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.013..9.921 rows=1,026 loops=1)

27. 10.804 23.586 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=23.575..23.586 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
28. 12.782 12.782 ↑ 1.0 1,126 1

Seq Scan on trailers trailers_1 (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.017..12.782 rows=1,126 loops=1)

29. 0.149 23.517 ↑ 1.1 12 1

Hash (cost=63.34..63.34 rows=13 width=108) (actual time=23.465..23.517 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.348 23.368 ↑ 1.1 12 1

Nested Loop (cost=34.77..63.34 rows=13 width=108) (actual time=5.838..23.368 rows=12 loops=1)

31. 0.335 22.816 ↑ 1.1 12 1

Nested Loop (cost=34.49..58.90 rows=13 width=4) (actual time=5.793..22.816 rows=12 loops=1)

32. 9.603 22.277 ↑ 1.1 12 1

Hash Join (cost=34.21..54.20 rows=13 width=4) (actual time=5.734..22.277 rows=12 loops=1)

  • Hash Cond: (assignment_deliveries.delivery_id = deliveries.id)
33. 10.564 10.564 ↑ 1.0 1,028 1

Seq Scan on assignment_deliveries (cost=0.00..17.28 rows=1,028 width=8) (actual time=0.026..10.564 rows=1,028 loops=1)

34. 0.052 2.110 ↑ 1.2 12 1

Hash (cost=34.04..34.04 rows=14 width=4) (actual time=2.097..2.110 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
35. 2.058 2.058 ↑ 1.2 12 1

Seq Scan on deliveries (cost=0.00..34.04 rows=14 width=4) (actual time=0.204..2.058 rows=12 loops=1)

  • Filter: ((name)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 1111
36. 0.204 0.204 ↑ 1.0 1 12

Index Scan using assignments_pkey on assignments (cost=0.28..0.36 rows=1 width=8) (actual time=0.016..0.017 rows=1 loops=12)

  • Index Cond: (id = assignment_deliveries.assignment_id)
37. 0.204 0.204 ↑ 1.0 1 12

Index Scan using appointments_pkey on appointments (cost=0.28..0.34 rows=1 width=108) (actual time=0.014..0.017 rows=1 loops=12)

  • Index Cond: (id = assignments.appointment_id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
38. 0.204 0.204 ↑ 1.0 1 12

Index Scan using tractors_pkey on tractors (cost=0.28..0.54 rows=1 width=45) (actual time=0.015..0.017 rows=1 loops=12)

  • Index Cond: (appointments.tractor_id = id)
39. 0.356 0.670 ↑ 1.0 27 1

Hash (cost=1.27..1.27 rows=27 width=68) (actual time=0.659..0.670 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
40. 0.314 0.314 ↑ 1.0 27 1

Seq Scan on carriers (cost=0.00..1.27 rows=27 width=68) (actual time=0.035..0.314 rows=27 loops=1)

41. 0.222 185.491 ↑ 1.6 8 1

Unique (cost=318.28..318.96 rows=13 width=253) (actual time=185.193..185.491 rows=8 loops=1)

42. 0.238 185.269 ↑ 1.1 12 1

Sort (cost=318.28..318.31 rows=13 width=253) (actual time=185.178..185.269 rows=12 loops=1)

  • Sort Key: appointments_3.id, appointments_3.appointment_type, appointments_3.update_time, appointments_3.tms_id, appointments_3.tms_source, appointments_3.tractor_id, appointments_3.gate_pass_number, appointments_3.gp_open_time, appointments_3.gp_close_time, appointments_3.gp_expiration, appointments_3.gp_close_type, tractors_1.name, tractors_1.tractor_state, tractors_1.tractor_country, tractors_1.license_plate, tractors_1.carrier_id, carriers_1.name, carriers_1.carrier_code, trailers_2.name, trailers_3.name
  • Sort Method: quicksort Memory: 28kB
43. 0.183 185.031 ↑ 1.1 12 1

Hash Left Join (cost=294.86..318.04 rows=13 width=253) (actual time=174.573..185.031 rows=12 loops=1)

  • Hash Cond: (tractors_1.carrier_id = carriers_1.id)
44. 0.258 184.314 ↑ 1.1 12 1

Nested Loop Left Join (cost=293.25..316.39 rows=13 width=189) (actual time=174.009..184.314 rows=12 loops=1)

45. 5.260 183.912 ↑ 1.1 12 1

Hash Right Join (cost=292.97..309.38 rows=13 width=148) (actual time=173.957..183.912 rows=12 loops=1)

  • Hash Cond: (appointments_4.id = appointments_3.id)
46. 10.491 78.597 ↑ 1.0 687 1

HashAggregate (cost=106.57..113.44 rows=687 width=24) (actual time=73.599..78.597 rows=687 loops=1)

  • Group Key: appointments_4.id, trailers_2.name
47. 10.282 68.106 ↑ 1.0 687 1

Hash Join (cost=71.42..103.14 rows=687 width=24) (actual time=42.438..68.106 rows=687 loops=1)

  • Hash Cond: (assignments_4.trailer_id = trailers_2.id)
48. 10.234 39.672 ↑ 1.0 687 1

Hash Join (cost=33.09..62.99 rows=687 width=8) (actual time=24.233..39.672 rows=687 loops=1)

  • Hash Cond: (assignments_4.appointment_id = appointments_4.id)
49. 5.254 5.254 ↑ 1.0 687 1

Seq Scan on assignments assignments_4 (cost=0.00..28.09 rows=687 width=8) (actual time=0.018..5.254 rows=687 loops=1)

  • Filter: (direction = 'Inbound'::trailerdirection)
  • Rows Removed by Filter: 680
50. 12.660 24.184 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=24.172..24.184 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
51. 11.524 11.524 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_4 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.013..11.524 rows=1,026 loops=1)

52. 9.226 18.152 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=18.140..18.152 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
53. 8.926 8.926 ↑ 1.0 1,126 1

Seq Scan on trailers trailers_2 (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.021..8.926 rows=1,126 loops=1)

54. 0.104 100.055 ↑ 1.1 12 1

Hash (cost=186.24..186.24 rows=13 width=128) (actual time=100.043..100.055 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
55. 4.755 99.951 ↑ 1.1 12 1

Hash Right Join (cost=170.00..186.24 rows=13 width=128) (actual time=90.898..99.951 rows=12 loops=1)

  • Hash Cond: (appointments_5.id = appointments_3.id)
56. 10.480 74.380 ↑ 1.0 680 1

HashAggregate (cost=106.50..113.30 rows=680 width=24) (actual time=69.451..74.380 rows=680 loops=1)

  • Group Key: appointments_5.id, trailers_3.name
57. 10.267 63.900 ↑ 1.0 680 1

Hash Join (cost=71.42..103.10 rows=680 width=24) (actual time=39.017..63.900 rows=680 loops=1)

  • Hash Cond: (assignments_5.trailer_id = trailers_3.id)
58. 9.732 33.670 ↑ 1.0 680 1

Hash Join (cost=33.09..62.97 rows=680 width=8) (actual time=19.014..33.670 rows=680 loops=1)

  • Hash Cond: (assignments_5.appointment_id = appointments_5.id)
59. 5.017 5.017 ↑ 1.0 680 1

Seq Scan on assignments assignments_5 (cost=0.00..28.09 rows=680 width=8) (actual time=0.021..5.017 rows=680 loops=1)

  • Filter: (direction = 'Outbound'::trailerdirection)
  • Rows Removed by Filter: 687
60. 9.779 18.921 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=18.909..18.921 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
61. 9.142 9.142 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_5 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.017..9.142 rows=1,026 loops=1)

62. 9.895 19.963 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=19.951..19.963 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
63. 10.068 10.068 ↑ 1.0 1,126 1

Seq Scan on trailers trailers_3 (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.016..10.068 rows=1,126 loops=1)

64. 0.108 20.816 ↑ 1.1 12 1

Hash (cost=63.34..63.34 rows=13 width=108) (actual time=20.804..20.816 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
65. 0.240 20.708 ↑ 1.1 12 1

Nested Loop (cost=34.77..63.34 rows=13 width=108) (actual time=3.963..20.708 rows=12 loops=1)

66. 0.287 19.964 ↑ 1.1 12 1

Nested Loop (cost=34.49..58.90 rows=13 width=4) (actual time=3.668..19.964 rows=12 loops=1)

67. 9.152 19.497 ↑ 1.1 12 1

Hash Join (cost=34.21..54.20 rows=13 width=4) (actual time=3.621..19.497 rows=12 loops=1)

  • Hash Cond: (assignment_deliveries_1.delivery_id = deliveries_1.id)
68. 9.091 9.091 ↑ 1.0 1,028 1

Seq Scan on assignment_deliveries assignment_deliveries_1 (cost=0.00..17.28 rows=1,028 width=8) (actual time=0.012..9.091 rows=1,028 loops=1)

69. 0.113 1.254 ↑ 1.2 12 1

Hash (cost=34.04..34.04 rows=14 width=4) (actual time=1.241..1.254 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
70. 1.141 1.141 ↑ 1.2 12 1

Seq Scan on deliveries deliveries_1 (cost=0.00..34.04 rows=14 width=4) (actual time=0.232..1.141 rows=12 loops=1)

  • Filter: ((route_id)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 1111
71. 0.180 0.180 ↑ 1.0 1 12

Index Scan using assignments_pkey on assignments assignments_3 (cost=0.28..0.36 rows=1 width=8) (actual time=0.014..0.015 rows=1 loops=12)

  • Index Cond: (id = assignment_deliveries_1.assignment_id)
72. 0.504 0.504 ↑ 1.0 1 12

Index Scan using appointments_pkey on appointments appointments_3 (cost=0.28..0.34 rows=1 width=108) (actual time=0.033..0.042 rows=1 loops=12)

  • Index Cond: (id = assignments_3.appointment_id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
73. 0.144 0.144 ↑ 1.0 1 12

Index Scan using tractors_pkey on tractors tractors_1 (cost=0.28..0.54 rows=1 width=45) (actual time=0.011..0.012 rows=1 loops=12)

  • Index Cond: (appointments_3.tractor_id = id)
74. 0.225 0.534 ↑ 1.0 27 1

Hash (cost=1.27..1.27 rows=27 width=68) (actual time=0.522..0.534 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
75. 0.309 0.309 ↑ 1.0 27 1

Seq Scan on carriers carriers_1 (cost=0.00..1.27 rows=27 width=68) (actual time=0.015..0.309 rows=27 loops=1)

76. 0.012 0.329 ↓ 0.0 0 1

Unique (cost=289.34..289.39 rows=1 width=253) (actual time=0.318..0.329 rows=0 loops=1)

77. 0.055 0.317 ↓ 0.0 0 1

Sort (cost=289.34..289.34 rows=1 width=253) (actual time=0.305..0.317 rows=0 loops=1)

  • Sort Key: appointments_6.id, appointments_6.appointment_type, appointments_6.update_time, appointments_6.tms_id, appointments_6.tms_source, appointments_6.tractor_id, appointments_6.gate_pass_number, appointments_6.gp_open_time, appointments_6.gp_close_time, appointments_6.gp_expiration, appointments_6.gp_close_type, tractors_2.name, tractors_2.tractor_state, tractors_2.tractor_country, tractors_2.license_plate, tractors_2.carrier_id, carriers_2.name, carriers_2.carrier_code, trailers_4.name, trailers_5.name
  • Sort Method: quicksort Memory: 25kB
78. 0.013 0.262 ↓ 0.0 0 1

Nested Loop Left Join (cost=272.72..289.33 rows=1 width=253) (actual time=0.250..0.262 rows=0 loops=1)

79. 0.012 0.249 ↓ 0.0 0 1

Nested Loop Left Join (cost=272.58..289.17 rows=1 width=189) (actual time=0.237..0.249 rows=0 loops=1)

80. 0.026 0.237 ↓ 0.0 0 1

Hash Right Join (cost=272.30..288.63 rows=1 width=148) (actual time=0.225..0.237 rows=0 loops=1)

  • Hash Cond: (appointments_7.id = appointments_6.id)
81. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.57..113.44 rows=687 width=24) (never executed)

  • Group Key: appointments_7.id, trailers_4.name
82. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.14 rows=687 width=24) (never executed)

  • Hash Cond: (assignments_7.trailer_id = trailers_4.id)
83. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.99 rows=687 width=8) (never executed)

  • Hash Cond: (assignments_7.appointment_id = appointments_7.id)
84. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_7 (cost=0.00..28.09 rows=687 width=8) (never executed)

  • Filter: (direction = 'Inbound'::trailerdirection)
85. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

86. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_7 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

87. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

88. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_4 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

89. 0.013 0.211 ↓ 0.0 0 1

Hash (cost=165.72..165.72 rows=1 width=128) (actual time=0.199..0.211 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
90. 0.024 0.198 ↓ 0.0 0 1

Hash Right Join (cost=149.56..165.72 rows=1 width=128) (actual time=0.186..0.198 rows=0 loops=1)

  • Hash Cond: (appointments_8.id = appointments_6.id)
91. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.50..113.30 rows=680 width=24) (never executed)

  • Group Key: appointments_8.id, trailers_5.name
92. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.10 rows=680 width=24) (never executed)

  • Hash Cond: (assignments_8.trailer_id = trailers_5.id)
93. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.97 rows=680 width=8) (never executed)

  • Hash Cond: (assignments_8.appointment_id = appointments_8.id)
94. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_8 (cost=0.00..28.09 rows=680 width=8) (never executed)

  • Filter: (direction = 'Outbound'::trailerdirection)
95. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

96. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_8 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

97. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

98. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_5 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

99. 0.013 0.174 ↓ 0.0 0 1

Hash (cost=43.05..43.05 rows=1 width=108) (actual time=0.162..0.174 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
100. 0.013 0.161 ↓ 0.0 0 1

Nested Loop (cost=0.83..43.05 rows=1 width=108) (actual time=0.149..0.161 rows=0 loops=1)

101. 0.012 0.148 ↓ 0.0 0 1

Nested Loop (cost=0.56..42.70 rows=1 width=4) (actual time=0.137..0.148 rows=0 loops=1)

102. 0.013 0.136 ↓ 0.0 0 1

Nested Loop (cost=0.28..42.34 rows=1 width=4) (actual time=0.124..0.136 rows=0 loops=1)

103. 0.123 0.123 ↓ 0.0 0 1

Seq Scan on deliveries deliveries_2 (cost=0.00..34.04 rows=1 width=4) (actual time=0.112..0.123 rows=0 loops=1)

  • Filter: ((bill_of_lading)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 1123
104. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_delivery_delivery_id_idx on assignment_deliveries assignment_deliveries_2 (cost=0.28..8.29 rows=1 width=8) (never executed)

  • Index Cond: (delivery_id = deliveries_2.id)
105. 0.000 0.000 ↓ 0.0 0

Index Scan using assignments_pkey on assignments assignments_6 (cost=0.28..0.36 rows=1 width=8) (never executed)

  • Index Cond: (id = assignment_deliveries_2.assignment_id)
106. 0.000 0.000 ↓ 0.0 0

Index Scan using appointments_pkey on appointments appointments_6 (cost=0.28..0.34 rows=1 width=108) (never executed)

  • Index Cond: (id = assignments_6.appointment_id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
107. 0.000 0.000 ↓ 0.0 0

Index Scan using tractors_pkey on tractors tractors_2 (cost=0.28..0.54 rows=1 width=45) (never executed)

  • Index Cond: (appointments_6.tractor_id = id)
108. 0.000 0.000 ↓ 0.0 0

Index Scan using carriers_pkey on carriers carriers_2 (cost=0.14..0.16 rows=1 width=68) (never executed)

  • Index Cond: (tractors_2.carrier_id = id)
109. 0.012 2.420 ↓ 0.0 0 1

Unique (cost=344.83..344.89 rows=1 width=253) (actual time=2.408..2.420 rows=0 loops=1)

110. 0.042 2.408 ↓ 0.0 0 1

Sort (cost=344.83..344.84 rows=1 width=253) (actual time=2.396..2.408 rows=0 loops=1)

  • Sort Key: appointments_9.id, appointments_9.appointment_type, appointments_9.update_time, appointments_9.tms_id, appointments_9.tms_source, appointments_9.tractor_id, appointments_9.gate_pass_number, appointments_9.gp_open_time, appointments_9.gp_close_time, appointments_9.gp_expiration, appointments_9.gp_close_type, tractors_3.name, tractors_3.tractor_state, tractors_3.tractor_country, tractors_3.license_plate, tractors_3.carrier_id, carriers_3.name, carriers_3.carrier_code, trailers_6.name, trailers_7.name
  • Sort Method: quicksort Memory: 25kB
111. 0.013 2.366 ↓ 0.0 0 1

Nested Loop Left Join (cost=326.73..344.82 rows=1 width=253) (actual time=2.354..2.366 rows=0 loops=1)

112. 0.012 2.353 ↓ 0.0 0 1

Nested Loop Left Join (cost=326.45..344.48 rows=1 width=257) (actual time=2.341..2.353 rows=0 loops=1)

  • Join Filter: (tractors_3.carrier_id = carriers_3.id)
113. 0.012 2.341 ↓ 0.0 0 1

Nested Loop Left Join (cost=326.45..342.87 rows=1 width=193) (actual time=2.329..2.341 rows=0 loops=1)

114. 0.025 2.329 ↓ 0.0 0 1

Hash Right Join (cost=326.18..342.50 rows=1 width=189) (actual time=2.317..2.329 rows=0 loops=1)

  • Hash Cond: (appointments_10.id = appointments_9.id)
115. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.57..113.44 rows=687 width=24) (never executed)

  • Group Key: appointments_10.id, trailers_6.name
116. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.14 rows=687 width=24) (never executed)

  • Hash Cond: (assignments_10.trailer_id = trailers_6.id)
117. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.99 rows=687 width=8) (never executed)

  • Hash Cond: (assignments_10.appointment_id = appointments_10.id)
118. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_10 (cost=0.00..28.09 rows=687 width=8) (never executed)

  • Filter: (direction = 'Inbound'::trailerdirection)
119. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

120. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_10 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

121. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

122. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_6 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

123. 0.012 2.304 ↓ 0.0 0 1

Hash (cost=219.59..219.59 rows=1 width=169) (actual time=2.292..2.304 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
124. 0.023 2.292 ↓ 0.0 0 1

Hash Right Join (cost=203.43..219.59 rows=1 width=169) (actual time=2.280..2.292 rows=0 loops=1)

  • Hash Cond: (appointments_11.id = appointments_9.id)
125. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.50..113.30 rows=680 width=24) (never executed)

  • Group Key: appointments_11.id, trailers_7.name
126. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.10 rows=680 width=24) (never executed)

  • Hash Cond: (assignments_11.trailer_id = trailers_7.id)
127. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.97 rows=680 width=8) (never executed)

  • Hash Cond: (assignments_11.appointment_id = appointments_11.id)
128. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_11 (cost=0.00..28.09 rows=680 width=8) (never executed)

  • Filter: (direction = 'Outbound'::trailerdirection)
129. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

130. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_11 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

131. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

132. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_7 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

133. 0.012 2.269 ↓ 0.0 0 1

Hash (cost=96.92..96.92 rows=1 width=149) (actual time=2.257..2.269 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
134. 0.013 2.257 ↓ 0.0 0 1

Nested Loop (cost=0.28..96.92 rows=1 width=149) (actual time=2.245..2.257 rows=0 loops=1)

135. 2.244 2.244 ↓ 0.0 0 1

Seq Scan on tractors tractors_3 (cost=0.00..88.61 rows=1 width=45) (actual time=2.232..2.244 rows=0 loops=1)

  • Filter: ((name)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 2929
136. 0.000 0.000 ↓ 0.0 0

Index Scan using appointment_tractor_id_idx on appointments appointments_9 (cost=0.28..8.30 rows=1 width=108) (never executed)

  • Index Cond: (tractor_id = tractors_3.id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
137. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_appointment_id_idx on assignments assignments_9 (cost=0.28..0.36 rows=1 width=8) (never executed)

  • Index Cond: (appointments_9.id = appointment_id)
138. 0.000 0.000 ↓ 0.0 0

Seq Scan on carriers carriers_3 (cost=0.00..1.27 rows=27 width=68) (never executed)

139. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_delivery_assignment_id_idx on assignment_deliveries assignment_deliveries_3 (cost=0.28..0.33 rows=1 width=8) (never executed)

  • Index Cond: (assignments_9.id = assignment_id)
140. 0.013 2.548 ↓ 0.0 0 1

Unique (cost=344.83..344.89 rows=1 width=253) (actual time=2.536..2.548 rows=0 loops=1)

141. 0.042 2.535 ↓ 0.0 0 1

Sort (cost=344.83..344.84 rows=1 width=253) (actual time=2.524..2.535 rows=0 loops=1)

  • Sort Key: appointments_12.id, appointments_12.appointment_type, appointments_12.update_time, appointments_12.tms_id, appointments_12.tms_source, appointments_12.tractor_id, appointments_12.gate_pass_number, appointments_12.gp_open_time, appointments_12.gp_close_time, appointments_12.gp_expiration, appointments_12.gp_close_type, tractors_4.name, tractors_4.tractor_state, tractors_4.tractor_country, tractors_4.license_plate, tractors_4.carrier_id, carriers_4.name, carriers_4.carrier_code, trailers_8.name, trailers_9.name
  • Sort Method: quicksort Memory: 25kB
142. 0.014 2.493 ↓ 0.0 0 1

Nested Loop Left Join (cost=326.73..344.82 rows=1 width=253) (actual time=2.481..2.493 rows=0 loops=1)

143. 0.013 2.479 ↓ 0.0 0 1

Nested Loop Left Join (cost=326.45..344.48 rows=1 width=257) (actual time=2.467..2.479 rows=0 loops=1)

  • Join Filter: (tractors_4.carrier_id = carriers_4.id)
144. 0.012 2.466 ↓ 0.0 0 1

Nested Loop Left Join (cost=326.45..342.87 rows=1 width=193) (actual time=2.455..2.466 rows=0 loops=1)

145. 0.025 2.454 ↓ 0.0 0 1

Hash Right Join (cost=326.18..342.50 rows=1 width=189) (actual time=2.442..2.454 rows=0 loops=1)

  • Hash Cond: (appointments_13.id = appointments_12.id)
146. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.57..113.44 rows=687 width=24) (never executed)

  • Group Key: appointments_13.id, trailers_8.name
147. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.14 rows=687 width=24) (never executed)

  • Hash Cond: (assignments_13.trailer_id = trailers_8.id)
148. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.99 rows=687 width=8) (never executed)

  • Hash Cond: (assignments_13.appointment_id = appointments_13.id)
149. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_13 (cost=0.00..28.09 rows=687 width=8) (never executed)

  • Filter: (direction = 'Inbound'::trailerdirection)
150. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

151. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_13 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

152. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

153. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_8 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

154. 0.091 2.429 ↓ 0.0 0 1

Hash (cost=219.59..219.59 rows=1 width=169) (actual time=2.417..2.429 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
155. 0.025 2.338 ↓ 0.0 0 1

Hash Right Join (cost=203.43..219.59 rows=1 width=169) (actual time=2.326..2.338 rows=0 loops=1)

  • Hash Cond: (appointments_14.id = appointments_12.id)
156. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.50..113.30 rows=680 width=24) (never executed)

  • Group Key: appointments_14.id, trailers_9.name
157. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.10 rows=680 width=24) (never executed)

  • Hash Cond: (assignments_14.trailer_id = trailers_9.id)
158. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.97 rows=680 width=8) (never executed)

  • Hash Cond: (assignments_14.appointment_id = appointments_14.id)
159. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_14 (cost=0.00..28.09 rows=680 width=8) (never executed)

  • Filter: (direction = 'Outbound'::trailerdirection)
160. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

161. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_14 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

162. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

163. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_9 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

164. 0.013 2.313 ↓ 0.0 0 1

Hash (cost=96.92..96.92 rows=1 width=149) (actual time=2.301..2.313 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
165. 0.000 2.300 ↓ 0.0 0 1

Nested Loop (cost=0.28..96.92 rows=1 width=149) (actual time=2.287..2.300 rows=0 loops=1)

166. 2.303 2.303 ↓ 0.0 0 1

Seq Scan on tractors tractors_4 (cost=0.00..88.61 rows=1 width=45) (actual time=2.273..2.303 rows=0 loops=1)

  • Filter: ((license_plate)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 2929
167. 0.000 0.000 ↓ 0.0 0

Index Scan using appointment_tractor_id_idx on appointments appointments_12 (cost=0.28..8.30 rows=1 width=108) (never executed)

  • Index Cond: (tractor_id = tractors_4.id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
168. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_appointment_id_idx on assignments assignments_12 (cost=0.28..0.36 rows=1 width=8) (never executed)

  • Index Cond: (appointments_12.id = appointment_id)
169. 0.000 0.000 ↓ 0.0 0

Seq Scan on carriers carriers_4 (cost=0.00..1.27 rows=27 width=68) (never executed)

170. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_delivery_assignment_id_idx on assignment_deliveries assignment_deliveries_4 (cost=0.28..0.33 rows=1 width=8) (never executed)

  • Index Cond: (assignments_12.id = assignment_id)
171. 0.009 1.220 ↓ 0.0 0 1

Unique (cost=189.81..189.86 rows=1 width=253) (actual time=1.209..1.220 rows=0 loops=1)

172. 0.061 1.211 ↓ 0.0 0 1

Sort (cost=189.81..189.81 rows=1 width=253) (actual time=1.196..1.211 rows=0 loops=1)

  • Sort Key: appointments_15.id, appointments_15.appointment_type, appointments_15.update_time, appointments_15.tms_id, appointments_15.tms_source, appointments_15.tractor_id, appointments_15.gate_pass_number, appointments_15.gp_open_time, appointments_15.gp_close_time, appointments_15.gp_expiration, appointments_15.gp_close_type, tractors_5.name, tractors_5.tractor_state, tractors_5.tractor_country, tractors_5.license_plate, tractors_5.carrier_id, carriers_5.name, carriers_5.carrier_code, trailers_11.name, trailers_10.name
  • Sort Method: quicksort Memory: 25kB
173. 0.013 1.150 ↓ 0.0 0 1

Nested Loop Left Join (cost=173.20..189.80 rows=1 width=253) (actual time=1.139..1.150 rows=0 loops=1)

174. 0.013 1.137 ↓ 0.0 0 1

Nested Loop Left Join (cost=172.92..189.46 rows=1 width=257) (actual time=1.125..1.137 rows=0 loops=1)

175. 0.013 1.124 ↓ 0.0 0 1

Nested Loop Left Join (cost=172.78..189.30 rows=1 width=193) (actual time=1.112..1.124 rows=0 loops=1)

176. 0.004 1.111 ↓ 0.0 0 1

Nested Loop Left Join (cost=172.50..188.76 rows=1 width=152) (actual time=1.099..1.111 rows=0 loops=1)

177. 0.035 1.107 ↓ 0.0 0 1

Hash Right Join (cost=172.23..188.39 rows=1 width=148) (actual time=1.086..1.107 rows=0 loops=1)

  • Hash Cond: (appointments_16.id = appointments_15.id)
178. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.50..113.30 rows=680 width=24) (never executed)

  • Group Key: appointments_16.id, trailers_10.name
179. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.10 rows=680 width=24) (never executed)

  • Hash Cond: (assignments_16.trailer_id = trailers_10.id)
180. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.97 rows=680 width=8) (never executed)

  • Hash Cond: (assignments_16.appointment_id = appointments_16.id)
181. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_16 (cost=0.00..28.09 rows=680 width=8) (never executed)

  • Filter: (direction = 'Outbound'::trailerdirection)
182. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

183. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_16 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

184. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

185. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_10 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

186. 0.001 1.072 ↓ 0.0 0 1

Hash (cost=65.72..65.72 rows=1 width=128) (actual time=1.060..1.072 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
187. 0.021 1.071 ↓ 0.0 0 1

Nested Loop (cost=57.66..65.72 rows=1 width=128) (actual time=1.047..1.071 rows=0 loops=1)

188. 0.016 1.050 ↓ 0.0 0 1

Unique (cost=57.38..57.39 rows=1 width=24) (actual time=1.034..1.050 rows=0 loops=1)

189. 0.026 1.034 ↓ 0.0 0 1

Sort (cost=57.38..57.39 rows=1 width=24) (actual time=1.022..1.034 rows=0 loops=1)

  • Sort Key: appointments_17.id, trailers_11.name
  • Sort Method: quicksort Memory: 25kB
190. 0.013 1.008 ↓ 0.0 0 1

Nested Loop (cost=27.37..57.37 rows=1 width=24) (actual time=0.996..1.008 rows=0 loops=1)

191. 0.000 0.995 ↓ 0.0 0 1

Hash Join (cost=27.09..56.99 rows=1 width=24) (actual time=0.983..0.995 rows=0 loops=1)

  • Hash Cond: (assignments_17.trailer_id = trailers_11.id)
192. 0.127 0.127 ↑ 687.0 1 1

Seq Scan on assignments assignments_17 (cost=0.00..28.09 rows=687 width=8) (actual time=0.016..0.127 rows=1 loops=1)

  • Filter: (direction = 'Inbound'::trailerdirection)
193. 0.014 0.948 ↓ 0.0 0 1

Hash (cost=27.08..27.08 rows=1 width=24) (actual time=0.936..0.948 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
194. 0.934 0.934 ↓ 0.0 0 1

Seq Scan on trailers trailers_11 (cost=0.00..27.08 rows=1 width=24) (actual time=0.922..0.934 rows=0 loops=1)

  • Filter: ((name)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 1126
195. 0.000 0.000 ↓ 0.0 0

Index Only Scan using appointments_pkey on appointments appointments_17 (cost=0.28..0.38 rows=1 width=4) (never executed)

  • Index Cond: (id = assignments_17.appointment_id)
  • Heap Fetches: 0
196. 0.000 0.000 ↓ 0.0 0

Index Scan using appointments_pkey on appointments appointments_15 (cost=0.28..8.30 rows=1 width=108) (never executed)

  • Index Cond: (id = appointments_17.id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
197. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_appointment_id_idx on assignments assignments_15 (cost=0.28..0.36 rows=1 width=8) (never executed)

  • Index Cond: (appointments_15.id = appointment_id)
198. 0.000 0.000 ↓ 0.0 0

Index Scan using tractors_pkey on tractors tractors_5 (cost=0.28..0.54 rows=1 width=45) (never executed)

  • Index Cond: (appointments_15.tractor_id = id)
199. 0.000 0.000 ↓ 0.0 0

Index Scan using carriers_pkey on carriers carriers_5 (cost=0.14..0.16 rows=1 width=68) (never executed)

  • Index Cond: (tractors_5.carrier_id = id)
200. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_delivery_assignment_id_idx on assignment_deliveries assignment_deliveries_5 (cost=0.28..0.33 rows=1 width=8) (never executed)

  • Index Cond: (assignments_15.id = assignment_id)
201. 0.012 1.209 ↓ 0.0 0 1

Unique (cost=190.03..190.08 rows=1 width=253) (actual time=1.198..1.209 rows=0 loops=1)

202. 0.042 1.197 ↓ 0.0 0 1

Sort (cost=190.03..190.03 rows=1 width=253) (actual time=1.185..1.197 rows=0 loops=1)

  • Sort Key: appointments_18.id, appointments_18.appointment_type, appointments_18.update_time, appointments_18.tms_id, appointments_18.tms_source, appointments_18.tractor_id, appointments_18.gate_pass_number, appointments_18.gp_open_time, appointments_18.gp_close_time, appointments_18.gp_expiration, appointments_18.gp_close_type, tractors_6.name, tractors_6.tractor_state, tractors_6.tractor_country, tractors_6.license_plate, tractors_6.carrier_id, carriers_6.name, carriers_6.carrier_code, trailers_12.name, trailers_13.name
  • Sort Method: quicksort Memory: 25kB
203. 0.012 1.155 ↓ 0.0 0 1

Nested Loop Left Join (cost=173.25..190.02 rows=1 width=253) (actual time=1.142..1.155 rows=0 loops=1)

204. 0.012 1.143 ↓ 0.0 0 1

Nested Loop Left Join (cost=172.98..189.68 rows=1 width=257) (actual time=1.130..1.143 rows=0 loops=1)

205. 0.013 1.131 ↓ 0.0 0 1

Nested Loop Left Join (cost=172.84..189.52 rows=1 width=193) (actual time=1.117..1.131 rows=0 loops=1)

206. 0.014 1.118 ↓ 0.0 0 1

Nested Loop Left Join (cost=172.56..188.98 rows=1 width=152) (actual time=1.105..1.118 rows=0 loops=1)

207. 0.032 1.104 ↓ 0.0 0 1

Hash Right Join (cost=172.28..188.61 rows=1 width=148) (actual time=1.092..1.104 rows=0 loops=1)

  • Hash Cond: (appointments_19.id = appointments_18.id)
208. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.57..113.44 rows=687 width=24) (never executed)

  • Group Key: appointments_19.id, trailers_12.name
209. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.14 rows=687 width=24) (never executed)

  • Hash Cond: (assignments_19.trailer_id = trailers_12.id)
210. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.99 rows=687 width=8) (never executed)

  • Hash Cond: (assignments_19.appointment_id = appointments_19.id)
211. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_19 (cost=0.00..28.09 rows=687 width=8) (never executed)

  • Filter: (direction = 'Inbound'::trailerdirection)
212. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

213. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_19 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

214. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

215. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_12 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

216. 0.012 1.072 ↓ 0.0 0 1

Hash (cost=65.70..65.70 rows=1 width=128) (actual time=1.060..1.072 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
217. 0.012 1.060 ↓ 0.0 0 1

Nested Loop (cost=57.64..65.70 rows=1 width=128) (actual time=1.048..1.060 rows=0 loops=1)

218. 0.013 1.048 ↓ 0.0 0 1

Unique (cost=57.36..57.37 rows=1 width=24) (actual time=1.035..1.048 rows=0 loops=1)

219. 0.019 1.035 ↓ 0.0 0 1

Sort (cost=57.36..57.37 rows=1 width=24) (actual time=1.023..1.035 rows=0 loops=1)

  • Sort Key: appointments_20.id, trailers_13.name
  • Sort Method: quicksort Memory: 25kB
220. 0.014 1.016 ↓ 0.0 0 1

Nested Loop (cost=27.37..57.35 rows=1 width=24) (actual time=1.002..1.016 rows=0 loops=1)

221. 0.000 1.002 ↓ 0.0 0 1

Hash Join (cost=27.09..56.97 rows=1 width=24) (actual time=0.990..1.002 rows=0 loops=1)

  • Hash Cond: (assignments_20.trailer_id = trailers_13.id)
222. 0.206 0.206 ↑ 680.0 1 1

Seq Scan on assignments assignments_20 (cost=0.00..28.09 rows=680 width=8) (actual time=0.012..0.206 rows=1 loops=1)

  • Filter: (direction = 'Outbound'::trailerdirection)
  • Rows Removed by Filter: 2
223. 0.013 0.958 ↓ 0.0 0 1

Hash (cost=27.08..27.08 rows=1 width=24) (actual time=0.946..0.958 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
224. 0.945 0.945 ↓ 0.0 0 1

Seq Scan on trailers trailers_13 (cost=0.00..27.08 rows=1 width=24) (actual time=0.933..0.945 rows=0 loops=1)

  • Filter: ((name)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 1126
225. 0.000 0.000 ↓ 0.0 0

Index Only Scan using appointments_pkey on appointments appointments_20 (cost=0.28..0.38 rows=1 width=4) (never executed)

  • Index Cond: (id = assignments_20.appointment_id)
  • Heap Fetches: 0
226. 0.000 0.000 ↓ 0.0 0

Index Scan using appointments_pkey on appointments appointments_18 (cost=0.28..8.30 rows=1 width=108) (never executed)

  • Index Cond: (id = appointments_20.id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
227. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_appointment_id_idx on assignments assignments_18 (cost=0.28..0.36 rows=1 width=8) (never executed)

  • Index Cond: (appointments_18.id = appointment_id)
228. 0.000 0.000 ↓ 0.0 0

Index Scan using tractors_pkey on tractors tractors_6 (cost=0.28..0.54 rows=1 width=45) (never executed)

  • Index Cond: (appointments_18.tractor_id = id)
229. 0.000 0.000 ↓ 0.0 0

Index Scan using carriers_pkey on carriers carriers_6 (cost=0.14..0.16 rows=1 width=68) (never executed)

  • Index Cond: (tractors_6.carrier_id = id)
230. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_delivery_assignment_id_idx on assignment_deliveries assignment_deliveries_6 (cost=0.28..0.33 rows=1 width=8) (never executed)

  • Index Cond: (assignments_18.id = assignment_id)
231. 0.021 0.958 ↓ 0.0 0 1

HashAggregate (cost=596.92..610.56 rows=1,364 width=253) (actual time=0.946..0.958 rows=0 loops=1)

  • Group Key: appointments_21.id, appointments_21.appointment_type, appointments_21.update_time, appointments_21.tms_id, appointments_21.tms_source, appointments_21.site_id, appointments_21.tractor_id, appointments_21.gate_pass_number, appointments_21.gp_open_time, appointments_21.gp_close_time, appointments_21.gp_expiration, appointments_21.gp_close_type, tractors_7.name, tractors_7.tractor_state, tractors_7.tractor_country, tractors_7.license_plate, tractors_7.carrier_id, carriers_7.name, carriers_7.carrier_code, trailers_15.name, trailers_14.name
232. 0.012 0.937 ↓ 0.0 0 1

Hash Left Join (cost=400.93..525.31 rows=1,364 width=253) (actual time=0.925..0.937 rows=0 loops=1)

  • Hash Cond: (appointments_21.id = assignments_21.appointment_id)
233. 0.012 0.925 ↓ 0.0 0 1

Hash Left Join (cost=322.09..427.72 rows=1,024 width=253) (actual time=0.914..0.925 rows=0 loops=1)

  • Hash Cond: (tractors_7.carrier_id = carriers_7.id)
234. 0.027 0.913 ↓ 0.0 0 1

Hash Right Join (cost=320.49..423.00 rows=1,024 width=189) (actual time=0.902..0.913 rows=0 loops=1)

  • Hash Cond: (tractors_7.id = appointments_21.tractor_id)
235. 0.000 0.000 ↓ 0.0 0

Seq Scan on tractors tractors_7 (cost=0.00..81.29 rows=2,929 width=45) (never executed)

236. 0.012 0.886 ↓ 0.0 0 1

Hash (cost=307.69..307.69 rows=1,024 width=148) (actual time=0.874..0.886 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
237. 0.022 0.874 ↓ 0.0 0 1

Hash Right Join (cost=284.75..307.69 rows=1,024 width=148) (actual time=0.862..0.874 rows=0 loops=1)

  • Hash Cond: (appointments_22.id = appointments_21.id)
238. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.50..113.30 rows=680 width=24) (never executed)

  • Group Key: appointments_22.id, trailers_14.name
239. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.10 rows=680 width=24) (never executed)

  • Hash Cond: (assignments_22.trailer_id = trailers_14.id)
240. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.97 rows=680 width=8) (never executed)

  • Hash Cond: (assignments_22.appointment_id = appointments_22.id)
241. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_22 (cost=0.00..28.09 rows=680 width=8) (never executed)

  • Filter: (direction = 'Outbound'::trailerdirection)
242. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

243. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_22 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

244. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

245. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_14 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

246. 0.012 0.852 ↓ 0.0 0 1

Hash (cost=165.45..165.45 rows=1,024 width=128) (actual time=0.841..0.852 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
247. 0.024 0.840 ↓ 0.0 0 1

Hash Right Join (cost=149.89..165.45 rows=1,024 width=128) (actual time=0.829..0.840 rows=0 loops=1)

  • Hash Cond: (appointments_23.id = appointments_21.id)
248. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=106.57..113.44 rows=687 width=24) (never executed)

  • Group Key: appointments_23.id, trailers_15.name
249. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.42..103.14 rows=687 width=24) (never executed)

  • Hash Cond: (assignments_23.trailer_id = trailers_15.id)
250. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.09..62.99 rows=687 width=8) (never executed)

  • Hash Cond: (assignments_23.appointment_id = appointments_23.id)
251. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_23 (cost=0.00..28.09 rows=687 width=8) (never executed)

  • Filter: (direction = 'Inbound'::trailerdirection)
252. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.26..20.26 rows=1,026 width=4) (never executed)

253. 0.000 0.000 ↓ 0.0 0

Seq Scan on appointments appointments_23 (cost=0.00..20.26 rows=1,026 width=4) (never executed)

254. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.26..24.26 rows=1,126 width=24) (never executed)

255. 0.000 0.000 ↓ 0.0 0

Seq Scan on trailers trailers_15 (cost=0.00..24.26 rows=1,126 width=24) (never executed)

256. 0.013 0.816 ↓ 0.0 0 1

Hash (cost=30.52..30.52 rows=1,024 width=108) (actual time=0.804..0.816 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
257. 0.803 0.803 ↓ 0.0 0 1

Seq Scan on appointments appointments_21 (cost=0.00..30.52 rows=1,024 width=108) (actual time=0.792..0.803 rows=0 loops=1)

  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1) AND (((gate_pass_number)::character varying)::text ~~* '%%hi%%'::text))
  • Rows Removed by Filter: 1026
258. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.27..1.27 rows=27 width=68) (never executed)

259. 0.000 0.000 ↓ 0.0 0

Seq Scan on carriers carriers_7 (cost=0.00..1.27 rows=27 width=68) (never executed)

260. 0.000 0.000 ↓ 0.0 0

Hash (cost=61.75..61.75 rows=1,367 width=4) (never executed)

261. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=41.76..61.75 rows=1,367 width=4) (never executed)

  • Hash Cond: (assignment_deliveries_7.assignment_id = assignments_21.id)
262. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignment_deliveries assignment_deliveries_7 (cost=0.00..17.28 rows=1,028 width=8) (never executed)

263. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.67..24.67 rows=1,367 width=8) (never executed)

264. 0.000 0.000 ↓ 0.0 0

Seq Scan on assignments assignments_21 (cost=0.00..24.67 rows=1,367 width=8) (never executed)

265. 9.200 284.714 ↓ 1.1 341 1

HashAggregate (cost=463.17..466.35 rows=318 width=253) (actual time=281.858..284.714 rows=341 loops=1)

  • Group Key: appointments_24.id, appointments_24.appointment_type, appointments_24.update_time, appointments_24.tms_id, appointments_24.tms_source, appointments_24.site_id, appointments_24.tractor_id, appointments_24.gate_pass_number, appointments_24.gp_open_time, appointments_24.gp_close_time, appointments_24.gp_expiration, appointments_24.gp_close_type, tractors_8.name, tractors_8.tractor_state, tractors_8.tractor_country, tractors_8.license_plate, tractors_8.carrier_id, carriers_8.name, carriers_8.carrier_code, trailers_16.name, trailers_17.name
266. 10.128 275.514 ↓ 2.1 682 1

Hash Left Join (cost=418.57..446.47 rows=318 width=253) (actual time=244.789..275.514 rows=682 loops=1)

  • Hash Cond: (tractors_8.carrier_id = carriers_8.id)
267. 12.870 265.329 ↓ 2.1 682 1

Hash Right Join (cost=417.22..440.75 rows=318 width=189) (actual time=244.697..265.329 rows=682 loops=1)

  • Hash Cond: (assignment_deliveries_8.assignment_id = assignments_24.id)
268. 7.812 7.812 ↑ 1.0 1,028 1

Seq Scan on assignment_deliveries assignment_deliveries_8 (cost=0.00..17.28 rows=1,028 width=8) (actual time=0.017..7.812 rows=1,028 loops=1)

269. 6.885 244.647 ↓ 2.1 682 1

Hash (cost=413.25..413.25 rows=318 width=193) (actual time=244.634..244.647 rows=682 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 131kB
270. 19.823 237.762 ↓ 2.1 682 1

Hash Right Join (cost=380.28..413.25 rows=318 width=193) (actual time=205.438..237.762 rows=682 loops=1)

  • Hash Cond: (assignments_24.appointment_id = appointments_24.id)
271. 12.558 12.558 ↑ 1.0 1,367 1

Seq Scan on assignments assignments_24 (cost=0.00..24.67 rows=1,367 width=8) (actual time=0.024..12.558 rows=1,367 loops=1)

272. 2.659 205.381 ↓ 1.4 341 1

Hash (cost=377.31..377.31 rows=238 width=189) (actual time=205.368..205.381 rows=341 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
273. 8.575 202.722 ↓ 1.4 341 1

Hash Right Join (cost=359.40..377.31 rows=238 width=189) (actual time=189.062..202.722 rows=341 loops=1)

  • Hash Cond: (appointments_25.id = appointments_24.id)
274. 11.224 72.967 ↑ 1.0 687 1

HashAggregate (cost=106.57..113.44 rows=687 width=24) (actual time=67.964..72.967 rows=687 loops=1)

  • Group Key: appointments_25.id, trailers_16.name
275. 10.812 61.743 ↑ 1.0 687 1

Hash Join (cost=71.42..103.14 rows=687 width=24) (actual time=35.412..61.743 rows=687 loops=1)

  • Hash Cond: (assignments_25.trailer_id = trailers_16.id)
276. 10.402 32.879 ↑ 1.0 687 1

Hash Join (cost=33.09..62.99 rows=687 width=8) (actual time=17.166..32.879 rows=687 loops=1)

  • Hash Cond: (assignments_25.appointment_id = appointments_25.id)
277. 5.368 5.368 ↑ 1.0 687 1

Seq Scan on assignments assignments_25 (cost=0.00..28.09 rows=687 width=8) (actual time=0.017..5.368 rows=687 loops=1)

  • Filter: (direction = 'Inbound'::trailerdirection)
  • Rows Removed by Filter: 680
278. 9.012 17.109 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=17.097..17.109 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
279. 8.097 8.097 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_25 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.012..8.097 rows=1,026 loops=1)

280. 8.859 18.052 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=18.039..18.052 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
281. 9.193 9.193 ↑ 1.0 1,126 1

Seq Scan on trailers trailers_16 (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.022..9.193 rows=1,126 loops=1)

282. 3.493 121.180 ↓ 1.4 341 1

Hash (cost=249.86..249.86 rows=238 width=169) (actual time=121.068..121.180 rows=341 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 60kB
283. 7.290 117.687 ↓ 1.4 341 1

Hash Right Join (cost=232.13..249.86 rows=238 width=169) (actual time=104.879..117.687 rows=341 loops=1)

  • Hash Cond: (appointments_26.id = appointments_24.id)
284. 11.394 70.883 ↑ 1.0 680 1

HashAggregate (cost=106.50..113.30 rows=680 width=24) (actual time=65.345..70.883 rows=680 loops=1)

  • Group Key: appointments_26.id, trailers_17.name
285. 10.030 59.489 ↑ 1.0 680 1

Hash Join (cost=71.42..103.10 rows=680 width=24) (actual time=33.960..59.489 rows=680 loops=1)

  • Hash Cond: (assignments_26.trailer_id = trailers_17.id)
286. 10.638 30.726 ↑ 1.0 680 1

Hash Join (cost=33.09..62.97 rows=680 width=8) (actual time=15.190..30.726 rows=680 loops=1)

  • Hash Cond: (assignments_26.appointment_id = appointments_26.id)
287. 4.941 4.941 ↑ 1.0 680 1

Seq Scan on assignments assignments_26 (cost=0.00..28.09 rows=680 width=8) (actual time=0.018..4.941 rows=680 loops=1)

  • Filter: (direction = 'Outbound'::trailerdirection)
  • Rows Removed by Filter: 687
288. 7.580 15.147 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=15.134..15.147 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
289. 7.567 7.567 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_26 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.013..7.567 rows=1,026 loops=1)

290. 9.565 18.733 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=18.720..18.733 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
291. 9.168 9.168 ↑ 1.0 1,126 1

Seq Scan on trailers trailers_17 (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.019..9.168 rows=1,126 loops=1)

292. 2.553 39.514 ↓ 1.4 341 1

Hash (cost=122.65..122.65 rows=238 width=149) (actual time=39.501..39.514 rows=341 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
293. 11.033 36.961 ↓ 1.4 341 1

Hash Join (cost=97.14..122.65 rows=238 width=149) (actual time=18.354..36.961 rows=341 loops=1)

  • Hash Cond: (appointments_24.tractor_id = tractors_8.id)
294. 7.586 7.586 ↑ 1.0 1,024 1

Seq Scan on appointments appointments_24 (cost=0.00..22.83 rows=1,024 width=108) (actual time=0.010..7.586 rows=1,024 loops=1)

  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
  • Rows Removed by Filter: 2
295. 8.582 18.342 ↑ 1.0 682 1

Hash (cost=88.61..88.61 rows=682 width=45) (actual time=18.313..18.342 rows=682 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 63kB
296. 9.760 9.760 ↑ 1.0 682 1

Seq Scan on tractors tractors_8 (cost=0.00..88.61 rows=682 width=45) (actual time=0.012..9.760 rows=682 loops=1)

  • Filter: (carrier_id = 7)
  • Rows Removed by Filter: 2247
297. 0.025 0.057 ↑ 1.0 1 1

Hash (cost=1.34..1.34 rows=1 width=68) (actual time=0.045..0.057 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
298. 0.032 0.032 ↑ 1.0 1 1

Seq Scan on carriers carriers_8 (cost=0.00..1.34 rows=1 width=68) (actual time=0.012..0.032 rows=1 loops=1)

  • Filter: (id = 7)
  • Rows Removed by Filter: 26
299. 5,009.199 29,263.742 ↑ 458.2 1,024 1

Unique (cost=162,876.65..187,510.49 rows=469,216 width=253) (actual time=19,572.314..29,263.742 rows=1,024 loops=1)

300. 12,193.711 24,254.543 ↓ 1.0 469,560 1

Sort (cost=162,876.65..164,049.69 rows=469,216 width=253) (actual time=19,572.299..24,254.543 rows=469,560 loops=1)

  • Sort Key: appointments_27.id, appointments_27.appointment_type, appointments_27.update_time, appointments_27.tms_id, appointments_27.tms_source, appointments_27.tractor_id, appointments_27.gate_pass_number, appointments_27.gp_open_time, appointments_27.gp_close_time, appointments_27.gp_expiration, appointments_27.gp_close_type, tractors_9.name, tractors_9.tractor_state, tractors_9.tractor_country, tractors_9.license_plate, tractors_9.carrier_id, carriers_9.name, carriers_9.carrier_code, trailers_20.name, trailers_19.name
  • Sort Method: external merge Disk: 76320kB
301. 7,780.819 12,060.832 ↓ 1.0 469,560 1

Nested Loop (cost=393.23..6,410.75 rows=469,216 width=253) (actual time=275.224..12,060.832 rows=469,560 loops=1)

302. 23.901 384.303 ↓ 1.0 1,365 1

Hash Left Join (cost=393.23..517.62 rows=1,364 width=253) (actual time=275.164..384.303 rows=1,365 loops=1)

  • Hash Cond: (appointments_27.id = assignments_27.appointment_id)
303. 18.509 285.353 ↑ 1.0 1,024 1

Hash Left Join (cost=314.40..420.02 rows=1,024 width=253) (actual time=200.086..285.353 rows=1,024 loops=1)

  • Hash Cond: (tractors_9.carrier_id = carriers_9.id)
304. 39.575 266.367 ↑ 1.0 1,024 1

Hash Right Join (cost=312.79..415.30 rows=1,024 width=189) (actual time=199.580..266.367 rows=1,024 loops=1)

  • Hash Cond: (tractors_9.id = appointments_27.tractor_id)
305. 27.293 27.293 ↑ 1.0 2,929 1

Seq Scan on tractors tractors_9 (cost=0.00..81.29 rows=2,929 width=45) (actual time=0.042..27.293 rows=2,929 loops=1)

306. 8.459 199.499 ↑ 1.0 1,024 1

Hash (cost=299.99..299.99 rows=1,024 width=148) (actual time=199.486..199.499 rows=1,024 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 120kB
307. 14.323 191.040 ↑ 1.0 1,024 1

Hash Right Join (cost=277.05..299.99 rows=1,024 width=148) (actual time=171.899..191.040 rows=1,024 loops=1)

  • Hash Cond: (appointments_28.id = appointments_27.id)
308. 10.288 68.711 ↑ 1.0 680 1

HashAggregate (cost=106.50..113.30 rows=680 width=24) (actual time=63.873..68.711 rows=680 loops=1)

  • Group Key: appointments_28.id, trailers_19.name
309. 10.100 58.423 ↑ 1.0 680 1

Hash Join (cost=71.42..103.10 rows=680 width=24) (actual time=32.228..58.423 rows=680 loops=1)

  • Hash Cond: (assignments_28.trailer_id = trailers_19.id)
310. 10.654 31.387 ↑ 1.0 680 1

Hash Join (cost=33.09..62.97 rows=680 width=8) (actual time=15.263..31.387 rows=680 loops=1)

  • Hash Cond: (assignments_28.appointment_id = appointments_28.id)
311. 5.511 5.511 ↑ 1.0 680 1

Seq Scan on assignments assignments_28 (cost=0.00..28.09 rows=680 width=8) (actual time=0.016..5.511 rows=680 loops=1)

  • Filter: (direction = 'Outbound'::trailerdirection)
  • Rows Removed by Filter: 687
312. 7.321 15.222 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=15.208..15.222 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
313. 7.901 7.901 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_28 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.021..7.901 rows=1,026 loops=1)

314. 8.809 16.936 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=16.922..16.936 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
315. 8.127 8.127 ↑ 1.0 1,126 1

Seq Scan on trailers trailers_19 (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.024..8.127 rows=1,126 loops=1)

316. 8.138 108.006 ↑ 1.0 1,024 1

Hash (cost=157.75..157.75 rows=1,024 width=128) (actual time=107.992..108.006 rows=1,024 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 105kB
317. 13.216 99.868 ↑ 1.0 1,024 1

Hash Right Join (cost=142.20..157.75 rows=1,024 width=128) (actual time=81.648..99.868 rows=1,024 loops=1)

  • Hash Cond: (appointments_29.id = appointments_27.id)
318. 10.924 70.658 ↑ 1.0 687 1

HashAggregate (cost=106.57..113.44 rows=687 width=24) (actual time=65.633..70.658 rows=687 loops=1)

  • Group Key: appointments_29.id, trailers_20.name
319. 10.646 59.734 ↑ 1.0 687 1

Hash Join (cost=71.42..103.14 rows=687 width=24) (actual time=33.557..59.734 rows=687 loops=1)

  • Hash Cond: (assignments_29.trailer_id = trailers_20.id)
320. 10.403 31.025 ↑ 1.0 687 1

Hash Join (cost=33.09..62.99 rows=687 width=8) (actual time=15.465..31.025 rows=687 loops=1)

  • Hash Cond: (assignments_29.appointment_id = appointments_29.id)
321. 5.204 5.204 ↑ 1.0 687 1

Seq Scan on assignments assignments_29 (cost=0.00..28.09 rows=687 width=8) (actual time=0.019..5.204 rows=687 loops=1)

  • Filter: (direction = 'Inbound'::trailerdirection)
  • Rows Removed by Filter: 680
322. 7.679 15.418 ↑ 1.0 1,026 1

Hash (cost=20.26..20.26 rows=1,026 width=4) (actual time=15.405..15.418 rows=1,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
323. 7.739 7.739 ↑ 1.0 1,026 1

Seq Scan on appointments appointments_29 (cost=0.00..20.26 rows=1,026 width=4) (actual time=0.013..7.739 rows=1,026 loops=1)

324. 9.028 18.063 ↑ 1.0 1,126 1

Hash (cost=24.26..24.26 rows=1,126 width=24) (actual time=18.050..18.063 rows=1,126 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
325. 9.035 9.035 ↑ 1.0 1,126 1

Seq Scan on trailers trailers_20 (cost=0.00..24.26 rows=1,126 width=24) (actual time=0.018..9.035 rows=1,126 loops=1)

326. 7.734 15.994 ↑ 1.0 1,024 1

Hash (cost=22.83..22.83 rows=1,024 width=108) (actual time=15.981..15.994 rows=1,024 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 88kB
327. 8.260 8.260 ↑ 1.0 1,024 1

Seq Scan on appointments appointments_27 (cost=0.00..22.83 rows=1,024 width=108) (actual time=0.020..8.260 rows=1,024 loops=1)

  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
  • Rows Removed by Filter: 2
328. 0.247 0.477 ↑ 1.0 27 1

Hash (cost=1.27..1.27 rows=27 width=68) (actual time=0.463..0.477 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
329. 0.230 0.230 ↑ 1.0 27 1

Seq Scan on carriers carriers_9 (cost=0.00..1.27 rows=27 width=68) (actual time=0.017..0.230 rows=27 loops=1)

330. 13.025 75.049 ↑ 1.0 1,367 1

Hash (cost=61.75..61.75 rows=1,367 width=4) (actual time=75.035..75.049 rows=1,367 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 65kB
331. 21.763 62.024 ↑ 1.0 1,367 1

Hash Right Join (cost=41.76..61.75 rows=1,367 width=4) (actual time=30.744..62.024 rows=1,367 loops=1)

  • Hash Cond: (assignment_deliveries_9.assignment_id = assignments_27.id)
332. 9.553 9.553 ↑ 1.0 1,028 1

Seq Scan on assignment_deliveries assignment_deliveries_9 (cost=0.00..17.28 rows=1,028 width=8) (actual time=0.017..9.553 rows=1,028 loops=1)

333. 15.371 30.708 ↑ 1.0 1,367 1

Hash (cost=24.67..24.67 rows=1,367 width=8) (actual time=30.694..30.708 rows=1,367 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 70kB
334. 15.337 15.337 ↑ 1.0 1,367 1

Seq Scan on assignments assignments_27 (cost=0.00..24.67 rows=1,367 width=8) (actual time=0.127..15.337 rows=1,367 loops=1)

335. 3,892.762 3,895.710 ↑ 1.0 344 1,365

Materialize (cost=0.00..28.80 rows=344 width=0) (actual time=0.008..2.854 rows=344 loops=1,365)

336. 2.948 2.948 ↑ 1.0 344 1

Seq Scan on trailers trailers_18 (cost=0.00..27.08 rows=344 width=0) (actual time=0.021..2.948 rows=344 loops=1)

  • Filter: (carrier_id = 7)
  • Rows Removed by Filter: 782
Planning time : 25.523 ms
Execution time : 30,101.315 ms