explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jIO4 : appointment search everything (original), filter_value='hi'

Settings
# exclusive inclusive rows x rows loops node
1. 5.333 423.431 ↑ 1.0 10 1

Limit (cost=1,498.02..1,498.05 rows=10 width=304) (actual time=421.730..423.431 rows=10 loops=1)

2. 9.005 418.098 ↑ 4.2 510 1

Sort (cost=1,496.77..1,502.09 rows=2,129 width=304) (actual time=414.734..418.098 rows=510 loops=1)

  • Sort Key: appointments.id DESC
  • Sort Method: quicksort Memory: 206kB
3. 14.796 409.093 ↑ 3.1 685 1

HashAggregate (cost=1,347.80..1,369.09 rows=2,129 width=304) (actual time=403.935..409.093 rows=685 loops=1)

  • Group 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
4. 15.942 394.297 ↑ 2.0 1,042 1

Append (cost=72.66..1,246.67 rows=2,129 width=304) (actual time=21.898..394.297 rows=1,042 loops=1)

5. 0.146 22.168 ↑ 1.6 8 1

Unique (cost=72.66..73.28 rows=13 width=213) (actual time=21.885..22.168 rows=8 loops=1)

6. 0.135 22.022 ↑ 1.1 12 1

Sort (cost=72.66..72.69 rows=13 width=213) (actual time=21.871..22.022 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
  • Sort Method: quicksort Memory: 28kB
7. 0.711 21.887 ↑ 1.1 12 1

Nested Loop Left Join (cost=35.19..72.42 rows=13 width=213) (actual time=4.449..21.887 rows=12 loops=1)

8. 0.274 21.032 ↑ 1.1 12 1

Nested Loop Left Join (cost=35.05..70.35 rows=13 width=149) (actual time=4.407..21.032 rows=12 loops=1)

9. 0.259 20.602 ↑ 1.1 12 1

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

10. 0.278 20.067 ↑ 1.1 12 1

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

11. 9.543 19.609 ↑ 1.1 12 1

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

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

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

13. 0.131 1.780 ↑ 1.2 12 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 1.649 1.649 ↑ 1.2 12 1

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

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

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

  • Index Cond: (id = assignment_deliveries.assignment_id)
16. 0.276 0.276 ↑ 1.0 1 12

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

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

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

  • Index Cond: (appointments.tractor_id = id)
18. 0.144 0.144 ↑ 1.0 1 12

Index Scan using carriers_pkey on carriers (cost=0.14..0.16 rows=1 width=68) (actual time=0.011..0.012 rows=1 loops=12)

  • Index Cond: (tractors.carrier_id = id)
19. 0.239 22.630 ↑ 1.6 8 1

Unique (cost=72.66..73.28 rows=13 width=213) (actual time=22.319..22.630 rows=8 loops=1)

20. 0.250 22.391 ↑ 1.1 12 1

Sort (cost=72.66..72.69 rows=13 width=213) (actual time=22.304..22.391 rows=12 loops=1)

  • Sort Key: appointments_1.id, appointments_1.appointment_type, appointments_1.update_time, appointments_1.tms_id, appointments_1.tms_source, appointments_1.tractor_id, appointments_1.gate_pass_number, appointments_1.gp_open_time, appointments_1.gp_close_time, appointments_1.gp_expiration, appointments_1.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
  • Sort Method: quicksort Memory: 28kB
21. 0.299 22.141 ↑ 1.1 12 1

Nested Loop Left Join (cost=35.19..72.42 rows=13 width=213) (actual time=3.434..22.141 rows=12 loops=1)

22. 0.603 21.686 ↑ 1.1 12 1

Nested Loop Left Join (cost=35.05..70.35 rows=13 width=149) (actual time=3.390..21.686 rows=12 loops=1)

23. 1.023 20.903 ↑ 1.1 12 1

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

24. 0.347 19.724 ↑ 1.1 12 1

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

25. 9.613 19.149 ↑ 1.1 12 1

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

  • Hash Cond: (assignment_deliveries_1.delivery_id = deliveries_1.id)
26. 8.456 8.456 ↑ 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.018..8.456 rows=1,028 loops=1)

27. 0.083 1.080 ↑ 1.2 12 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
28. 0.997 0.997 ↑ 1.2 12 1

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

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

Index Scan using assignments_pkey on assignments assignments_1 (cost=0.28..0.36 rows=1 width=12) (actual time=0.018..0.019 rows=1 loops=12)

  • Index Cond: (id = assignment_deliveries_1.assignment_id)
30. 0.156 0.156 ↑ 1.0 1 12

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

  • Index Cond: (id = assignments_1.appointment_id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
31. 0.180 0.180 ↑ 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.014..0.015 rows=1 loops=12)

  • Index Cond: (appointments_1.tractor_id = id)
32. 0.156 0.156 ↑ 1.0 1 12

Index Scan using carriers_pkey on carriers carriers_1 (cost=0.14..0.16 rows=1 width=68) (actual time=0.012..0.013 rows=1 loops=12)

  • Index Cond: (tractors_1.carrier_id = id)
33. 0.012 0.776 ↓ 0.0 0 1

Unique (cost=43.76..43.81 rows=1 width=213) (actual time=0.765..0.776 rows=0 loops=1)

34. 0.050 0.764 ↓ 0.0 0 1

Sort (cost=43.76..43.76 rows=1 width=213) (actual time=0.752..0.764 rows=0 loops=1)

  • Sort Key: appointments_2.id, appointments_2.appointment_type, appointments_2.update_time, appointments_2.tms_id, appointments_2.tms_source, appointments_2.tractor_id, appointments_2.gate_pass_number, appointments_2.gp_open_time, appointments_2.gp_close_time, appointments_2.gp_expiration, appointments_2.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
  • Sort Method: quicksort Memory: 25kB
35. 0.012 0.714 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.25..43.75 rows=1 width=213) (actual time=0.703..0.714 rows=0 loops=1)

36. 0.013 0.702 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.11..43.59 rows=1 width=149) (actual time=0.690..0.702 rows=0 loops=1)

37. 0.236 0.689 ↓ 0.0 0 1

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

38. 0.013 0.453 ↓ 0.0 0 1

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

39. 0.013 0.440 ↓ 0.0 0 1

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

40. 0.427 0.427 ↓ 0.0 0 1

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

  • Filter: ((bill_of_lading)::text ~~* '%%hi%%'::text)
  • Rows Removed by Filter: 1123
41. 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)
42. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (id = assignments_2.appointment_id)
  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
44. 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_2.tractor_id = id)
45. 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)
46. 0.089 1.017 ↓ 0.0 0 1

Unique (cost=56.75..56.80 rows=1 width=213) (actual time=1.006..1.017 rows=0 loops=1)

47. 0.034 0.928 ↓ 0.0 0 1

Sort (cost=56.75..56.75 rows=1 width=213) (actual time=0.917..0.928 rows=0 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_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
  • Sort Method: quicksort Memory: 25kB
48. 0.012 0.894 ↓ 0.0 0 1

Nested Loop Left Join (cost=28.06..56.74 rows=1 width=213) (actual time=0.883..0.894 rows=0 loops=1)

49. 0.013 0.882 ↓ 0.0 0 1

Nested Loop Left Join (cost=27.78..56.40 rows=1 width=217) (actual time=0.870..0.882 rows=0 loops=1)

50. 0.012 0.869 ↓ 0.0 0 1

Nested Loop Left Join (cost=27.65..56.24 rows=1 width=153) (actual time=0.858..0.869 rows=0 loops=1)

51. 0.012 0.857 ↓ 0.0 0 1

Nested Loop (cost=27.37..55.70 rows=1 width=112) (actual time=0.846..0.857 rows=0 loops=1)

52. 0.020 0.845 ↓ 0.0 0 1

Hash Join (cost=27.09..55.36 rows=1 width=8) (actual time=0.833..0.845 rows=0 loops=1)

  • Hash Cond: (assignments_3.trailer_id = trailers.id)
53. 0.024 0.024 ↑ 1,367.0 1 1

Seq Scan on assignments assignments_3 (cost=0.00..24.67 rows=1,367 width=12) (actual time=0.013..0.024 rows=1 loops=1)

54. 0.013 0.801 ↓ 0.0 0 1

Hash (cost=27.08..27.08 rows=1 width=4) (actual time=0.790..0.801 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
55. 0.788 0.788 ↓ 0.0 0 1

Seq Scan on trailers (cost=0.00..27.08 rows=1 width=4) (actual time=0.777..0.788 rows=0 loops=1)

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

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

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

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

  • Index Cond: (appointments_3.tractor_id = id)
58. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (tractors_3.carrier_id = id)
59. 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_3.id = assignment_id)
60. 0.013 2.584 ↓ 0.0 0 1

Unique (cost=99.25..99.30 rows=1 width=213) (actual time=2.572..2.584 rows=0 loops=1)

61. 0.035 2.571 ↓ 0.0 0 1

Sort (cost=99.25..99.25 rows=1 width=213) (actual time=2.560..2.571 rows=0 loops=1)

  • Sort Key: appointments_4.id, appointments_4.appointment_type, appointments_4.update_time, appointments_4.tms_id, appointments_4.tms_source, appointments_4.tractor_id, appointments_4.gate_pass_number, appointments_4.gp_open_time, appointments_4.gp_close_time, appointments_4.gp_expiration, appointments_4.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
  • Sort Method: quicksort Memory: 25kB
62. 0.013 2.536 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.83..99.24 rows=1 width=213) (actual time=2.524..2.536 rows=0 loops=1)

63. 0.014 2.523 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.56..98.90 rows=1 width=217) (actual time=2.511..2.523 rows=0 loops=1)

  • Join Filter: (tractors_4.carrier_id = carriers_4.id)
64. 0.013 2.509 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.56..97.29 rows=1 width=153) (actual time=2.498..2.509 rows=0 loops=1)

65. 0.076 2.496 ↓ 0.0 0 1

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

66. 2.420 2.420 ↓ 0.0 0 1

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

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

Index Scan using appointment_tractor_id_idx on appointments appointments_4 (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))
68. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (appointments_4.id = appointment_id)
69. 0.000 0.000 ↓ 0.0 0

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

70. 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_4.id = assignment_id)
71. 0.012 2.048 ↓ 0.0 0 1

Unique (cost=99.25..99.30 rows=1 width=213) (actual time=2.037..2.048 rows=0 loops=1)

72. 0.033 2.036 ↓ 0.0 0 1

Sort (cost=99.25..99.25 rows=1 width=213) (actual time=2.025..2.036 rows=0 loops=1)

  • Sort Key: appointments_5.id, appointments_5.appointment_type, appointments_5.update_time, appointments_5.tms_id, appointments_5.tms_source, appointments_5.tractor_id, appointments_5.gate_pass_number, appointments_5.gp_open_time, appointments_5.gp_close_time, appointments_5.gp_expiration, appointments_5.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
  • Sort Method: quicksort Memory: 25kB
73. 0.026 2.003 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.83..99.24 rows=1 width=213) (actual time=1.978..2.003 rows=0 loops=1)

74. 0.012 1.977 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.56..98.90 rows=1 width=217) (actual time=1.965..1.977 rows=0 loops=1)

  • Join Filter: (tractors_5.carrier_id = carriers_5.id)
75. 0.013 1.965 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.56..97.29 rows=1 width=153) (actual time=1.953..1.965 rows=0 loops=1)

76. 0.000 1.952 ↓ 0.0 0 1

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

77. 1.953 1.953 ↓ 0.0 0 1

Seq Scan on tractors tractors_5 (cost=0.00..88.61 rows=1 width=45) (actual time=1.923..1.953 rows=0 loops=1)

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

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

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

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

  • Index Cond: (appointments_5.id = appointment_id)
80. 0.000 0.000 ↓ 0.0 0

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

81. 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_5.id = assignment_id)
82. 0.018 0.869 ↓ 0.0 0 1

HashAggregate (cost=302.18..315.82 rows=1,364 width=213) (actual time=0.857..0.869 rows=0 loops=1)

  • Group Key: appointments_6.id, appointments_6.appointment_type, appointments_6.update_time, appointments_6.tms_id, appointments_6.tms_source, appointments_6.site_id, 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_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
83. 0.013 0.851 ↓ 0.0 0 1

Hash Left Join (cost=127.32..237.39 rows=1,364 width=213) (actual time=0.839..0.851 rows=0 loops=1)

  • Hash Cond: (tractors_6.carrier_id = carriers_6.id)
84. 0.026 0.838 ↓ 0.0 0 1

Hash Right Join (cost=125.72..231.63 rows=1,364 width=149) (actual time=0.827..0.838 rows=0 loops=1)

  • Hash Cond: (tractors_6.id = appointments_6.tractor_id)
85. 0.000 0.000 ↓ 0.0 0

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

86. 0.012 0.812 ↓ 0.0 0 1

Hash (cost=108.67..108.67 rows=1,364 width=108) (actual time=0.801..0.812 rows=0 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 16kB
87. 0.022 0.800 ↓ 0.0 0 1

Hash Right Join (cost=85.08..108.67 rows=1,364 width=108) (actual time=0.789..0.800 rows=0 loops=1)

  • Hash Cond: (assignments_6.appointment_id = appointments_6.id)
88. 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_6.assignment_id = assignments_6.id)
89. 0.000 0.000 ↓ 0.0 0

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

90. 0.000 0.000 ↓ 0.0 0

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

91. 0.000 0.000 ↓ 0.0 0

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

92. 0.012 0.778 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
93. 0.766 0.766 ↓ 0.0 0 1

Seq Scan on appointments appointments_6 (cost=0.00..30.52 rows=1,024 width=108) (actual time=0.755..0.766 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
94. 0.000 0.000 ↓ 0.0 0

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

95. 0.000 0.000 ↓ 0.0 0

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

96. 9.744 110.120 ↓ 1.1 341 1

HashAggregate (cost=206.92..210.10 rows=318 width=213) (actual time=107.440..110.120 rows=341 loops=1)

  • Group Key: appointments_7.id, appointments_7.appointment_type, appointments_7.update_time, appointments_7.tms_id, appointments_7.tms_source, appointments_7.site_id, appointments_7.tractor_id, appointments_7.gate_pass_number, appointments_7.gp_open_time, appointments_7.gp_close_time, appointments_7.gp_expiration, appointments_7.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
97. 12.602 100.376 ↓ 2.1 682 1

Hash Left Join (cost=163.92..191.81 rows=318 width=213) (actual time=63.878..100.376 rows=682 loops=1)

  • Hash Cond: (tractors_7.carrier_id = carriers_7.id)
98. 15.749 87.701 ↓ 2.1 682 1

Hash Right Join (cost=162.57..186.09 rows=318 width=149) (actual time=63.779..87.701 rows=682 loops=1)

  • Hash Cond: (assignment_deliveries_7.assignment_id = assignments_7.id)
99. 8.335 8.335 ↑ 1.0 1,028 1

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

100. 6.013 63.617 ↓ 2.1 682 1

Hash (cost=158.59..158.59 rows=318 width=153) (actual time=63.606..63.617 rows=682 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 99kB
101. 15.065 57.604 ↓ 2.1 682 1

Hash Right Join (cost=125.63..158.59 rows=318 width=153) (actual time=32.839..57.604 rows=682 loops=1)

  • Hash Cond: (assignments_7.appointment_id = appointments_7.id)
102. 9.745 9.745 ↑ 1.0 1,367 1

Seq Scan on assignments assignments_7 (cost=0.00..24.67 rows=1,367 width=12) (actual time=0.016..9.745 rows=1,367 loops=1)

103. 3.339 32.794 ↓ 1.4 341 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
104. 10.215 29.455 ↓ 1.4 341 1

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

  • Hash Cond: (appointments_7.tractor_id = tractors_7.id)
105. 7.907 7.907 ↑ 1.0 1,024 1

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

  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
  • Rows Removed by Filter: 2
106. 5.880 11.333 ↑ 1.0 682 1

Hash (cost=88.61..88.61 rows=682 width=45) (actual time=11.322..11.333 rows=682 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 63kB
107. 5.453 5.453 ↑ 1.0 682 1

Seq Scan on tractors tractors_7 (cost=0.00..88.61 rows=682 width=45) (actual time=0.010..5.453 rows=682 loops=1)

  • Filter: (carrier_id = 7)
  • Rows Removed by Filter: 2247
108. 0.040 0.073 ↑ 1.0 1 1

Hash (cost=1.34..1.34 rows=1 width=68) (actual time=0.062..0.073 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
109. 0.033 0.033 ↑ 1.0 1 1

Seq Scan on carriers carriers_7 (cost=0.00..1.34 rows=1 width=68) (actual time=0.014..0.033 rows=1 loops=1)

  • Filter: (id = 7)
  • Rows Removed by Filter: 26
110. 12.077 216.143 ↓ 1.6 685 1

HashAggregate (cost=249.54..253.71 rows=417 width=213) (actual time=210.224..216.143 rows=685 loops=1)

  • Group Key: appointments_8.id, appointments_8.appointment_type, appointments_8.update_time, appointments_8.tms_id, appointments_8.tms_source, appointments_8.site_id, appointments_8.tractor_id, appointments_8.gate_pass_number, appointments_8.gp_open_time, appointments_8.gp_close_time, appointments_8.gp_expiration, appointments_8.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
111. 10.218 204.066 ↓ 1.6 685 1

Hash Left Join (cost=132.02..229.73 rows=417 width=213) (actual time=143.034..204.066 rows=685 loops=1)

  • Hash Cond: (tractors_8.carrier_id = carriers_8.id)
112. 28.938 193.387 ↓ 1.6 685 1

Hash Right Join (cost=130.42..226.86 rows=417 width=149) (actual time=142.544..193.387 rows=685 loops=1)

  • Hash Cond: (tractors_8.id = appointments_8.tractor_id)
113. 21.944 21.944 ↑ 1.0 2,929 1

Seq Scan on tractors tractors_8 (cost=0.00..81.29 rows=2,929 width=45) (actual time=0.016..21.944 rows=2,929 loops=1)

114. 11.237 142.505 ↓ 1.6 685 1

Hash (cost=125.20..125.20 rows=417 width=108) (actual time=142.493..142.505 rows=685 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 62kB
115. 25.672 131.268 ↓ 1.6 685 1

Hash Join (cost=94.37..125.20 rows=417 width=108) (actual time=88.856..131.268 rows=685 loops=1)

  • Hash Cond: (appointments_8.id = assignments_8.appointment_id)
116. 16.811 16.811 ↑ 1.0 1,024 1

Seq Scan on appointments appointments_8 (cost=0.00..22.83 rows=1,024 width=108) (actual time=0.022..16.811 rows=1,024 loops=1)

  • Filter: ((gp_open_time IS NOT NULL) AND (site_id = 1))
  • Rows Removed by Filter: 2
117. 10.203 88.785 ↓ 1.6 685 1

Hash (cost=89.14..89.14 rows=418 width=4) (actual time=88.774..88.785 rows=685 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
118. 26.388 78.582 ↓ 1.6 685 1

Hash Right Join (cost=64.87..89.14 rows=418 width=4) (actual time=37.262..78.582 rows=685 loops=1)

  • Hash Cond: (assignment_deliveries_8.assignment_id = assignments_8.id)
119. 15.098 15.098 ↑ 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.022..15.098 rows=1,028 loops=1)

120. 5.428 37.096 ↓ 1.6 685 1

Hash (cost=59.64..59.64 rows=418 width=8) (actual time=37.085..37.096 rows=685 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
121. 15.690 31.668 ↓ 1.6 685 1

Hash Join (cost=31.38..59.64 rows=418 width=8) (actual time=5.245..31.668 rows=685 loops=1)

  • Hash Cond: (assignments_8.trailer_id = trailers_1.id)
122. 10.747 10.747 ↑ 1.0 1,367 1

Seq Scan on assignments assignments_8 (cost=0.00..24.67 rows=1,367 width=12) (actual time=0.011..10.747 rows=1,367 loops=1)

123. 2.598 5.231 ↑ 1.0 344 1

Hash (cost=27.08..27.08 rows=344 width=4) (actual time=5.206..5.231 rows=344 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
124. 2.633 2.633 ↑ 1.0 344 1

Seq Scan on trailers trailers_1 (cost=0.00..27.08 rows=344 width=4) (actual time=0.015..2.633 rows=344 loops=1)

  • Filter: (carrier_id = 7)
  • Rows Removed by Filter: 782
125. 0.197 0.461 ↑ 1.0 27 1

Hash (cost=1.27..1.27 rows=27 width=68) (actual time=0.449..0.461 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
126. 0.264 0.264 ↑ 1.0 27 1

Seq Scan on carriers carriers_8 (cost=0.00..1.27 rows=27 width=68) (actual time=0.011..0.264 rows=27 loops=1)

Planning time : 9.749 ms
Execution time : 425.745 ms