explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1kDo

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=147,057.69..147,068.60 rows=1 width=322) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Subquery Scan on voylegs_sts (cost=147,057.69..147,068.60 rows=1 width=322) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Result (cost=147,057.69..147,068.59 rows=1 width=330) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Unique (cost=147,057.69..147,057.71 rows=1 width=338) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Sort (cost=147,057.69..147,057.69 rows=1 width=338) (actual rows= loops=)

  • Sort Key: arr.voyageid, arr.subvoyageid, arr.report_date_utcts, arr.port, arr.mrv_port, arr.sts_opl, deptsbefore.report_date_utcts DESC, ddeparturemsg.report_date_utcts
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=789.27..147,057.68 rows=1 width=338) (actual rows= loops=)

  • Join Filter: ((ddeparturemsg.report_date_utcts > arr.report_date_utcts) AND (arr.voyageid = ddeparturemsg.voyageid) AND (arr.subvoyageid = ddeparturemsg.subvoyageid))
7. 0.000 0.000 ↓ 0.0

HashAggregate (cost=375.88..379.60 rows=372 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg.id, ddeparturemsg.vslid, ddeparturemsg.voyageid, ddeparturemsg.subvoyageid, ddeparturemsg.report_date_utcts, ddeparturemsg.port, ddeparturemsg.mrv_port, ddeparturemsg.sts_opl, ('d'::text), ((((((((COALESCE(ddeparturemsg.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsfo_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg.me_do_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsdo_cons, '0'::real))))::double precision), (NULL::double precision), (NULL::double precision), ((((((((COALESCE(ddeparturemsg.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsfo_after_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsdo_after_cons, '0'::real))))::double precision), ddeparturemsg.fwe_time_utcts, ddeparturemsg.sb_time_utcts, ddeparturemsg.distance_eosp_fwe
8. 0.000 0.000 ↓ 0.0

Append (cost=280.12..359.14 rows=372 width=244) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

HashAggregate (cost=280.12..284.60 rows=224 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg.id, ddeparturemsg.vslid, ddeparturemsg.voyageid, ddeparturemsg.subvoyageid, ddeparturemsg.report_date_utcts, ddeparturemsg.port, ddeparturemsg.mrv_port, ddeparturemsg.sts_opl, ('d'::text), ((((((COALESCE(ddeparturemsg.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsfo_cons, '0'::real))), ((((((COALESCE(ddeparturemsg.me_do_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsdo_cons, '0'::real))), (NULL::double precision), (NULL::double precision), ((((((COALESCE(ddeparturemsg.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsfo_after_cons, '0'::real))), ((((((COALESCE(ddeparturemsg.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg.blr_lsdo_after_cons, '0'::real))), ddeparturemsg.fwe_time_utcts, ddeparturemsg.sb_time_utcts, ddeparturemsg.distance_eosp_fwe
10. 0.000 0.000 ↓ 0.0

Append (cost=0.29..270.04 rows=224 width=228) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Result (cost=0.29..131.90 rows=110 width=126) (actual rows= loops=)

  • One-Time Filter: ('d'::text = ANY ('{l,d}'::text[]))
12. 0.000 0.000 ↓ 0.0

Index Scan using ddeparturemsg_vslid_idx on ddeparturemsg (cost=0.29..131.90 rows=110 width=126) (actual rows= loops=)

  • Index Cond: (vslid = 111)
  • Filter: (NOT COALESCE(sts_opl, false))
13. 0.000 0.000 ↓ 0.0

Result (cost=0.29..135.91 rows=114 width=127) (actual rows= loops=)

  • One-Time Filter: ('l'::text = ANY ('{l,d}'::text[]))
14. 0.000 0.000 ↓ 0.0

Index Scan using ldeparturemsg_vslid_idx on ldeparturemsg (cost=0.29..135.91 rows=114 width=127) (actual rows= loops=)

  • Index Cond: (vslid = 111)
  • Filter: (NOT COALESCE(sts_opl, false))
15. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=0.29..74.53 rows=148 width=143) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Result (cost=0.29..72.31 rows=148 width=135) (actual rows= loops=)

  • One-Time Filter: ('o'::text = ANY ('{l,d}'::text[]))
17. 0.000 0.000 ↓ 0.0

Index Scan using odeparturemsg_vslid_idx on odeparturemsg (cost=0.29..72.31 rows=148 width=135) (actual rows= loops=)

  • Index Cond: (vslid = 111)
18. 0.000 0.000 ↓ 0.0

Materialize (cost=413.40..146,652.05 rows=3 width=214) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Nested Loop (cost=413.40..146,652.04 rows=3 width=214) (actual rows= loops=)

  • Join Filter: ((deptsbefore.voyageid <= arr.voyageid) AND (deptsbefore.report_date_utcts < arr.report_date_utcts))
20. 0.000 0.000 ↓ 0.0

Subquery Scan on deptsbefore (cost=413.11..84,227.82 rows=6 width=180) (actual rows= loops=)

  • Filter: ((deptsbefore.dept_type = ANY ('{l,d}'::text[])) OR ((deptsbefore.dept_type = 'o'::text) AND (deptsbefore.id = (SubPlan 5))))
21. 0.000 0.000 ↓ 0.0

HashAggregate (cost=413.11..419.02 rows=591 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg_1.id, ddeparturemsg_1.vslid, ddeparturemsg_1.voyageid, ddeparturemsg_1.subvoyageid, ddeparturemsg_1.report_date_utcts, ddeparturemsg_1.port, ddeparturemsg_1.mrv_port, ddeparturemsg_1.sts_opl, ('d'::text), ((((((((COALESCE(ddeparturemsg_1.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsfo_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_1.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsdo_cons, '0'::real))))::double precision), (NULL::double precision), (NULL::double precision), ((((((((COALESCE(ddeparturemsg_1.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsfo_after_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_1.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsdo_after_cons, '0'::real))))::double precision), ddeparturemsg_1.fwe_time_utcts, ddeparturemsg_1.sb_time_utcts, ddeparturemsg_1.distance_eosp_fwe
22. 0.000 0.000 ↓ 0.0

Append (cost=303.12..386.51 rows=591 width=244) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

HashAggregate (cost=303.12..311.98 rows=443 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg_1.id, ddeparturemsg_1.vslid, ddeparturemsg_1.voyageid, ddeparturemsg_1.subvoyageid, ddeparturemsg_1.report_date_utcts, ddeparturemsg_1.port, ddeparturemsg_1.mrv_port, ddeparturemsg_1.sts_opl, ('d'::text), ((((((COALESCE(ddeparturemsg_1.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsfo_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_1.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsdo_cons, '0'::real))), (NULL::double precision), (NULL::double precision), ((((((COALESCE(ddeparturemsg_1.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsfo_after_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_1.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_1.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_1.blr_lsdo_after_cons, '0'::real))), ddeparturemsg_1.fwe_time_utcts, ddeparturemsg_1.sb_time_utcts, ddeparturemsg_1.distance_eosp_fwe
24. 0.000 0.000 ↓ 0.0

Append (cost=0.29..283.18 rows=443 width=228) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Index Scan using ddeparturemsg_vslid_idx on ddeparturemsg ddeparturemsg_1 (cost=0.29..137.30 rows=218 width=126) (actual rows= loops=)

  • Index Cond: (vslid = 111)
  • Filter: (NOT sts_opl)
26. 0.000 0.000 ↓ 0.0

Index Scan using ldeparturemsg_vslid_idx on ldeparturemsg ldeparturemsg_1 (cost=0.29..141.46 rows=225 width=127) (actual rows= loops=)

  • Index Cond: (vslid = 111)
  • Filter: (NOT sts_opl)
27. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3_1 (cost=0.29..74.53 rows=148 width=143) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using odeparturemsg_vslid_idx on odeparturemsg odeparturemsg_1 (cost=0.29..72.31 rows=148 width=135) (actual rows= loops=)

  • Index Cond: (vslid = 111)
29.          

SubPlan (forSubquery Scan)

30. 0.000 0.000 ↓ 0.0

Limit (cost=141.79..141.79 rows=1 width=12) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Sort (cost=141.79..142.28 rows=195 width=12) (actual rows= loops=)

  • Sort Key: deptfirst.report_date_utcts
32. 0.000 0.000 ↓ 0.0

Subquery Scan on deptfirst (cost=136.91..140.81 rows=195 width=12) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

HashAggregate (cost=136.91..138.86 rows=195 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg_4.id, ddeparturemsg_4.vslid, ddeparturemsg_4.voyageid, ddeparturemsg_4.subvoyageid, ddeparturemsg_4.report_date_utcts, ddeparturemsg_4.port, ddeparturemsg_4.mrv_port, ddeparturemsg_4.sts_opl, ('d'::text), ((((((((COALESCE(ddeparturemsg_4.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsfo_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_4.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsdo_cons, '0'::real))))::double precision), (NULL::double precision), (NULL::double precision), ((((((((COALESCE(ddeparturemsg_4.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsfo_after_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_4.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsdo_after_cons, '0'::real))))::double precision), ddeparturemsg_4.fwe_time_utcts, ddeparturemsg_4.sb_time_utcts, ddeparturemsg_4.distance_eosp_fwe
34. 0.000 0.000 ↓ 0.0

Append (cost=87.05..128.14 rows=195 width=244) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

HashAggregate (cost=87.05..89.49 rows=122 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg_4.id, ddeparturemsg_4.vslid, ddeparturemsg_4.voyageid, ddeparturemsg_4.subvoyageid, ddeparturemsg_4.report_date_utcts, ddeparturemsg_4.port, ddeparturemsg_4.mrv_port, ddeparturemsg_4.sts_opl, ('d'::text), ((((((COALESCE(ddeparturemsg_4.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsfo_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_4.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsdo_cons, '0'::real))), (NULL::double precision), (NULL::double precision), ((((((COALESCE(ddeparturemsg_4.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsfo_after_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_4.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_4.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_4.blr_lsdo_after_cons, '0'::real))), ddeparturemsg_4.fwe_time_utcts, ddeparturemsg_4.sb_time_utcts, ddeparturemsg_4.distance_eosp_fwe
36. 0.000 0.000 ↓ 0.0

Append (cost=0.29..81.56 rows=122 width=228) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Index Scan using ddeparturemsg_vslid_idx on ddeparturemsg ddeparturemsg_4 (cost=0.29..40.73 rows=62 width=126) (actual rows= loops=)

  • Index Cond: (vslid = deptsbefore.vslid)
38. 0.000 0.000 ↓ 0.0

Index Scan using ldeparturemsg_vslid_idx on ldeparturemsg ldeparturemsg_4 (cost=0.29..39.61 rows=60 width=127) (actual rows= loops=)

  • Index Cond: (vslid = deptsbefore.vslid)
39. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3_4 (cost=0.29..38.65 rows=73 width=143) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Index Scan using odeparturemsg_vslid_idx on odeparturemsg odeparturemsg_4 (cost=0.29..37.56 rows=73 width=135) (actual rows= loops=)

  • Index Cond: (vslid = deptsbefore.vslid)
41. 0.000 0.000 ↓ 0.0

Materialize (cost=0.29..62,423.71 rows=5 width=38) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Index Scan using arrivalmsg_vslid_idx on arrivalmsg arr (cost=0.29..62,423.68 rows=5 width=38) (actual rows= loops=)

  • Index Cond: (vslid = 111)
  • Filter: ((NOT sts_opl) AND (((SubPlan 3) = ROW('l'::text, false)) OR ((SubPlan 4) = ROW('d'::text, false))))
43.          

SubPlan (forIndex Scan)

44. 0.000 0.000 ↓ 0.0

Limit (cost=57.47..57.47 rows=1 width=40) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Sort (cost=57.47..57.47 rows=3 width=40) (actual rows= loops=)

  • Sort Key: deptsafter_check.report_date_utcts
46. 0.000 0.000 ↓ 0.0

Subquery Scan on deptsafter_check (cost=57.39..57.45 rows=3 width=40) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

HashAggregate (cost=57.39..57.42 rows=3 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg_2.id, ddeparturemsg_2.vslid, ddeparturemsg_2.voyageid, ddeparturemsg_2.subvoyageid, ddeparturemsg_2.report_date_utcts, ddeparturemsg_2.port, ddeparturemsg_2.mrv_port, ddeparturemsg_2.sts_opl, ('d'::text), ((((((((COALESCE(ddeparturemsg_2.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsfo_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_2.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsdo_cons, '0'::real))))::double precision), (NULL::double precision), (NULL::double precision), ((((((((COALESCE(ddeparturemsg_2.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsfo_after_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_2.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsdo_after_cons, '0'::real))))::double precision), ddeparturemsg_2.fwe_time_utcts, ddeparturemsg_2.sb_time_utcts, ddeparturemsg_2.distance_eosp_fwe
48. 0.000 0.000 ↓ 0.0

Append (cost=37.01..57.26 rows=3 width=244) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Result (cost=37.01..37.14 rows=2 width=244) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Unique (cost=37.01..37.10 rows=2 width=228) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Sort (cost=37.01..37.01 rows=2 width=228) (actual rows= loops=)

  • Sort Key: ddeparturemsg_2.id, ddeparturemsg_2.vslid, ddeparturemsg_2.voyageid, ddeparturemsg_2.subvoyageid, ddeparturemsg_2.report_date_utcts, ddeparturemsg_2.port, ddeparturemsg_2.mrv_port, ddeparturemsg_2.sts_opl, ('d'::text), ((((((COALESCE(ddeparturemsg_2.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsfo_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_2.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsdo_cons, '0'::real))), (NULL::double precision), (NULL::double precision), ((((((COALESCE(ddeparturemsg_2.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsfo_after_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_2.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_2.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_2.blr_lsdo_after_cons, '0'::real))), ddeparturemsg_2.fwe_time_utcts, ddeparturemsg_2.sb_time_utcts, ddeparturemsg_2.distance_eosp_fwe
52. 0.000 0.000 ↓ 0.0

Append (cost=0.29..37.00 rows=2 width=228) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Index Scan using ddeparturemsg_vslid_report_date_utcts_idx on ddeparturemsg ddeparturemsg_2 (cost=0.29..18.99 rows=1 width=126) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts > arr.report_date_utcts))
  • Filter: ((voyageid = arr.voyageid) AND (subvoyageid = arr.subvoyageid))
54. 0.000 0.000 ↓ 0.0

Index Scan using ldeparturemsg_vslid_report_date_utcts_idx on ldeparturemsg ldeparturemsg_2 (cost=0.29..17.99 rows=1 width=127) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts > arr.report_date_utcts))
  • Filter: ((voyageid = arr.voyageid) AND (subvoyageid = arr.subvoyageid))
55. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3_2 (cost=0.29..20.11 rows=1 width=143) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Index Scan using odeparturemsg_vslid_report_date_utcts_idx on odeparturemsg odeparturemsg_2 (cost=0.29..20.10 rows=1 width=135) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts > arr.report_date_utcts))
  • Filter: ((voyageid = arr.voyageid) AND (subvoyageid = arr.subvoyageid))
57. 0.000 0.000 ↓ 0.0

Limit (cost=57.47..57.47 rows=1 width=40) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Sort (cost=57.47..57.47 rows=3 width=40) (actual rows= loops=)

  • Sort Key: deptsafter_check_1.report_date_utcts
59. 0.000 0.000 ↓ 0.0

Subquery Scan on deptsafter_check_1 (cost=57.39..57.45 rows=3 width=40) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

HashAggregate (cost=57.39..57.42 rows=3 width=244) (actual rows= loops=)

  • Group Key: ddeparturemsg_3.id, ddeparturemsg_3.vslid, ddeparturemsg_3.voyageid, ddeparturemsg_3.subvoyageid, ddeparturemsg_3.report_date_utcts, ddeparturemsg_3.port, ddeparturemsg_3.mrv_port, ddeparturemsg_3.sts_opl, ('d'::text), ((((((((COALESCE(ddeparturemsg_3.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsfo_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_3.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsdo_cons, '0'::real))))::double precision), (NULL::double precision), (NULL::double precision), ((((((((COALESCE(ddeparturemsg_3.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsfo_after_cons, '0'::real))))::double precision), ((((((((COALESCE(ddeparturemsg_3.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsdo_after_cons, '0'::real))))::double precision), ddeparturemsg_3.fwe_time_utcts, ddeparturemsg_3.sb_time_utcts, ddeparturemsg_3.distance_eosp_fwe
61. 0.000 0.000 ↓ 0.0

Append (cost=37.01..57.26 rows=3 width=244) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Result (cost=37.01..37.14 rows=2 width=244) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Unique (cost=37.01..37.10 rows=2 width=228) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Sort (cost=37.01..37.01 rows=2 width=228) (actual rows= loops=)

  • Sort Key: ddeparturemsg_3.id, ddeparturemsg_3.vslid, ddeparturemsg_3.voyageid, ddeparturemsg_3.subvoyageid, ddeparturemsg_3.report_date_utcts, ddeparturemsg_3.port, ddeparturemsg_3.mrv_port, ddeparturemsg_3.sts_opl, ('d'::text), ((((((COALESCE(ddeparturemsg_3.me_fo_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsfo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_fo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsfo_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_3.me_do_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_do_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsdo_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_do_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsdo_cons, '0'::real))), (NULL::double precision), (NULL::double precision), ((((((COALESCE(ddeparturemsg_3.me_fo_after_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsfo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_fo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsfo_after_cons, '0'::real))), ((((((COALESCE(ddeparturemsg_3.me_do_after_cons, '0'::real) + COALESCE(ddeparturemsg_3.me_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.dg_lsdo_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_do_after_cons, '0'::real)) + COALESCE(ddeparturemsg_3.blr_lsdo_after_cons, '0'::real))), ddeparturemsg_3.fwe_time_utcts, ddeparturemsg_3.sb_time_utcts, ddeparturemsg_3.distance_eosp_fwe
65. 0.000 0.000 ↓ 0.0

Append (cost=0.29..37.00 rows=2 width=228) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Index Scan using ddeparturemsg_vslid_report_date_utcts_idx on ddeparturemsg ddeparturemsg_3 (cost=0.29..18.99 rows=1 width=126) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts > arr.report_date_utcts))
  • Filter: ((voyageid = arr.voyageid) AND (subvoyageid = arr.subvoyageid))
67. 0.000 0.000 ↓ 0.0

Index Scan using ldeparturemsg_vslid_report_date_utcts_idx on ldeparturemsg ldeparturemsg_3 (cost=0.29..17.99 rows=1 width=127) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts > arr.report_date_utcts))
  • Filter: ((voyageid = arr.voyageid) AND (subvoyageid = arr.subvoyageid))
68. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3_3 (cost=0.29..20.11 rows=1 width=143) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Index Scan using odeparturemsg_vslid_report_date_utcts_idx on odeparturemsg odeparturemsg_3 (cost=0.29..20.10 rows=1 width=135) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts > arr.report_date_utcts))
  • Filter: ((voyageid = arr.voyageid) AND (subvoyageid = arr.subvoyageid))
70.          

SubPlan (forResult)

71. 0.000 0.000 ↓ 0.0

Aggregate (cost=5.71..5.72 rows=1 width=4) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

HashAggregate (cost=5.61..5.65 rows=4 width=228) (actual rows= loops=)

  • Group Key: vslid, report_date_utcts, ('noon'::text), vslstate, (COALESCE(steam_time, '0'::real)), (COALESCE(wind_rel_force, 0)), (COALESCE(wind_force, 0)), (COALESCE(wind_rel_dir, 0)), (COALESCE(slip, '0'::real)), (COALESCE(speed, '0'::real)), me_fo_cons, (COALESCE(me_lsfo_cons, '0'::real)), (COALESCE(arrsum(dg_fo_cons), '0'::real)), (COALESCE(arrsum(dg_lsfo_cons), '0'::real)), (COALESCE(arrsum(blr_fo_bal_cons), '0'::real)), (COALESCE(arrsum(blr_fo_cargo_heat_cons), '0'::real)), (COALESCE(arrsum(blr_fo_changeof_ballast_cons), '0'::real)), (COALESCE(arrsum(blr_fo_debal_cons), '0'::real)), (0), (COALESCE(arrsum(blr_fo_h2s_cons), '0'::real)), (COALESCE(arrsum(blr_fo_idle_cons), '0'::real)), (COALESCE(arrsum(blr_fo_inert_cons), '0'::real)), (0), (COALESCE(arrsum(blr_fo_misc_cons), '0'::real)), (COALESCE(arrsum(blr_fo_tank_clean_cons), '0'::real)), (COALESCE(arrsum(blr_fo_tgen_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_bal_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_cargo_heat_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_changeof_ballast_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_debal_cons), '0'::real)), (0), (COALESCE(arrsum(blr_lsfo_h2s_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_idle_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_inert_cons), '0'::real)), (0), (COALESCE(arrsum(blr_lsfo_misc_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_tank_clean_cons), '0'::real)), (COALESCE(arrsum(blr_lsfo_tgen_cons), '0'::real)), ((((((((((((me_fo_cons + COALESCE(arrsum(dg_fo_cons), '0'::real)) + COALESCE(arrsum(blr_fo_bal_cons), '0'::real)) + COALESCE(arrsum(blr_fo_cargo_heat_cons), '0'::real)) + COALESCE(arrsum(blr_fo_changeof_ballast_cons), '0'::real)) + COALESCE(arrsum(blr_fo_debal_cons), '0'::real)) + COALESCE(arrsum(blr_fo_h2s_cons), '0'::real)) + COALESCE(arrsum(blr_fo_idle_cons), '0'::real)) + COALESCE(arrsum(blr_fo_inert_cons), '0'::real)) + COALESCE(arrsum(blr_fo_misc_cons), '0'::real)) + COALESCE(arrsum(blr_fo_tank_clean_cons), '0'::real)) + COALESCE(arrsum(blr_fo_tgen_cons), '0'::real))), ((((((((((((COALESCE(me_lsfo_cons, '0'::real) + COALESCE(arrsum(dg_lsfo_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_bal_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_cargo_heat_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_changeof_ballast_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_debal_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_h2s_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_idle_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_inert_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_misc_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_tank_clean_cons), '0'::real)) + COALESCE(arrsum(blr_lsfo_tgen_cons), '0'::real))), (COALESCE(me_rpm, '0'::real)), (COALESCE(ship_power, '0'::real))
73. 0.000 0.000 ↓ 0.0

Append (cost=0.00..5.19 rows=4 width=228) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=210) (actual rows= loops=)

  • One-Time Filter: false
75. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=0.42..5.19 rows=3 width=228) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Index Scan using anchoragemsg_vslid_report_date_utcts_idx on anchoragemsg an (cost=0.42..5.12 rows=3 width=256) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts >= arr.report_date_utcts) AND (report_date_utcts <= ddeparturemsg.fwe_time_utcts))
77. 0.000 0.000 ↓ 0.0

Aggregate (cost=5.14..5.15 rows=1 width=4) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

HashAggregate (cost=5.04..5.08 rows=4 width=140) (actual rows= loops=)

  • Group Key: vslid, report_date_utcts, ('noon'::text), vslstate, (COALESCE(steam_time, '0'::real)), (COALESCE(wind_rel_force, 0)), (COALESCE(wind_force, 0)), (COALESCE(wind_rel_dir, 0)), (COALESCE(slip, '0'::real)), (COALESCE(speed, '0'::real)), (COALESCE(me_do_cons, '0'::real)), (COALESCE(me_lsdo_cons, '0'::real)), ((COALESCE(arrsum(dg_do_cons), '0'::real) + COALESCE(arrsum(dg_do_tank_clean_igs_cons), '0'::real))), ((COALESCE(arrsum(dg_lsdo_cons), '0'::real) + COALESCE(arrsum(dg_lsdo_tank_clean_igs_cons), '0'::real))), (COALESCE(arrsum(blr_do_misc_cons), '0'::real)), (COALESCE(arrsum(blr_lsdo_misc_cons), '0'::real)), ((((COALESCE(me_do_cons, '0'::real) + COALESCE(arrsum(dg_do_cons), '0'::real)) + COALESCE(arrsum(dg_do_tank_clean_igs_cons), '0'::real)) + COALESCE(arrsum(blr_do_misc_cons), '0'::real))), ((((COALESCE(me_lsdo_cons, '0'::real) + COALESCE(arrsum(dg_lsdo_cons), '0'::real)) + COALESCE(arrsum(dg_lsdo_tank_clean_igs_cons), '0'::real)) + COALESCE(arrsum(blr_lsdo_misc_cons), '0'::real))), (COALESCE(arrsum(dg_do_tank_clean_igs_cons), '0'::real)), (COALESCE(arrsum(dg_lsdo_tank_clean_igs_cons), '0'::real))
79. 0.000 0.000 ↓ 0.0

Append (cost=0.00..4.84 rows=4 width=140) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=122) (actual rows= loops=)

  • One-Time Filter: false
81. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2_1 (cost=0.42..4.84 rows=3 width=140) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Index Scan using anchoragemsg_vslid_report_date_utcts_idx on anchoragemsg an_1 (cost=0.42..4.79 rows=3 width=140) (actual rows= loops=)

  • Index Cond: ((vslid = arr.vslid) AND (report_date_utcts >= arr.report_date_utcts) AND (report_date_utcts <= ddeparturemsg.fwe_time_utcts))