explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QLbe

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 19,450.809 ↑ 1.0 100 1

Limit (cost=2,877,679,718.70..2,877,679,724.45 rows=100 width=202) (actual time=19,450.672..19,450.809 rows=100 loops=1)

  • (cost=2,877,664,228.97..2877664234.72 rows=100 width=202)
2. 0.098 19,450.782 ↑ 4,312.6 100 1

Unique (cost=2,877,679,718.70..2,877,704,516.26 rows=431,262 width=202) (actual time=19,450.671..19,450.782 rows=100 loops=1)

3. 1.559 19,450.684 ↑ 4,312.6 100 1

Sort (cost=2,877,679,718.70..2,877,680,796.85 rows=431,262 width=202) (actual time=19,450.669..19,450.684 rows=100 loops=1)

  • Sort Key: s.uuid, d.external_id, d.sked_number, d.date, s.date_of_sending, s.date_of_meeting, s.planned_date_of_meeting, s.waybill_number, s.branch_to_code, s.carrier_code, s.transport_type_code, s.flight_code, d.date_closed, d.number, d.description, s.fact_weight, s.volume, amount_weight.cargo_place_amount, amount_weight.design_weight, sync.sync_count, sync_problem.uuid, (bool_or(cpc.urgent))
  • Sort Method: quicksort Memory: 127kB
4. 1.540 19,449.125 ↑ 1,117.3 386 1

Nested Loop Left Join (cost=6,646.84..2,877,614,317.75 rows=431,262 width=202) (actual time=7,201.232..19,449.125 rows=386 loops=1)

5. 1.243 19,422.495 ↑ 1,117.3 386 1

Nested Loop Left Join (cost=3.67..12,653,183.66 rows=431,262 width=217) (actual time=7,201.196..19,422.495 rows=386 loops=1)

6. 2.119 19,131.366 ↓ 2.3 386 1

Nested Loop Left Join (cost=1.96..374,071.73 rows=171 width=217) (actual time=7,200.572..19,131.366 rows=386 loops=1)

7. 7,173.956 19,083.313 ↓ 2.3 386 1

Nested Loop Left Join (cost=1.41..368,901.88 rows=171 width=201) (actual time=7,200.552..19,083.313 rows=386 loops=1)

  • Join Filter: (sync.document_uuid = s.uuid)
  • Rows Removed by Join Filter: 114,155,347
8. 1.284 385.713 ↓ 2.3 386 1

Nested Loop Left Join (cost=0.85..53,163.36 rows=171 width=193) (actual time=157.835..385.713 rows=386 loops=1)

9. 3.724 380.955 ↓ 2.3 386 1

Nested Loop (cost=0.43..52,886.50 rows=171 width=183) (actual time=157.820..380.955 rows=386 loops=1)

10. 2.106 250.001 ↓ 1.5 21,205 1

Append (cost=0.00..26,069.85 rows=13,959 width=81) (actual time=156.762..250.001 rows=21,205 loops=1)

11. 0.019 0.019 ↓ 0.0 0 1

Seq Scan on document_p2018_11 d (cost=0.00..1.16 rows=1 width=73) (actual time=0.019..0.019 rows=0 loops=1)

  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND (date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date) AND ((type)::text = 'SHIPMENT'::text))
  • Rows Removed by Filter: 9
12. 0.012 0.012 ↓ 0.0 0 1

Index Scan using document_p2018_12_date_idx on document_p2018_12 d_1 (cost=0.28..2.50 rows=1 width=65) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
13. 0.006 0.006 ↓ 0.0 0 1

Index Scan using document_p2019_01_date_idx on document_p2019_01 d_2 (cost=0.29..2.51 rows=1 width=66) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
14. 0.006 0.006 ↓ 0.0 0 1

Index Scan using document_p2019_02_date_idx on document_p2019_02 d_3 (cost=0.29..2.51 rows=1 width=67) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
15. 0.005 0.005 ↓ 0.0 0 1

Index Scan using document_p2019_03_date_idx on document_p2019_03 d_4 (cost=0.29..2.51 rows=1 width=66) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
16. 0.005 0.005 ↓ 0.0 0 1

Index Scan using document_p2019_04_date_idx on document_p2019_04 d_5 (cost=0.29..2.51 rows=1 width=67) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
17. 0.006 0.006 ↓ 0.0 0 1

Index Scan using document_p2019_05_date_idx on document_p2019_05 d_6 (cost=0.29..2.52 rows=1 width=67) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
18. 0.007 0.007 ↓ 0.0 0 1

Index Scan using document_p2019_06_date_idx on document_p2019_06 d_7 (cost=0.42..2.96 rows=1 width=66) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
19. 0.006 0.006 ↓ 0.0 0 1

Index Scan using document_p2019_07_date_idx on document_p2019_07 d_8 (cost=0.42..2.64 rows=1 width=66) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
20. 0.007 0.007 ↓ 0.0 0 1

Index Scan using document_p2019_08_date_idx on document_p2019_08 d_9 (cost=0.42..2.64 rows=1 width=66) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
21. 0.008 0.008 ↓ 0.0 0 1

Index Scan using document_p2019_09_date_idx on document_p2019_09 d_10 (cost=0.42..2.65 rows=1 width=67) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
22. 0.007 0.007 ↓ 0.0 0 1

Index Scan using document_p2019_10_date_idx on document_p2019_10 d_11 (cost=0.43..10.19 rows=5 width=68) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
23. 0.007 0.007 ↓ 0.0 0 1

Index Scan using document_p2019_11_date_idx on document_p2019_11 d_12 (cost=0.43..15.79 rows=8 width=75) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
24. 0.007 0.007 ↓ 0.0 0 1

Index Scan using document_p2019_12_date_idx on document_p2019_12 d_13 (cost=0.43..16.24 rows=7 width=69) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
25. 0.007 0.007 ↓ 0.0 0 1

Index Scan using document_p2020_01_date_idx on document_p2020_01 d_14 (cost=0.43..14.04 rows=7 width=69) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
26. 0.008 0.008 ↓ 0.0 0 1

Index Scan using document_p2020_02_date_idx on document_p2020_02 d_15 (cost=0.43..15.41 rows=8 width=69) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
27. 0.006 0.006 ↓ 0.0 0 1

Index Scan using document_p2020_03_date_idx on document_p2020_03 d_16 (cost=0.43..11.38 rows=6 width=69) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
28. 0.008 0.008 ↓ 0.0 0 1

Index Scan using document_p2020_04_date_idx on document_p2020_04 d_17 (cost=0.43..12.78 rows=7 width=69) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
29. 0.008 0.008 ↓ 0.0 0 1

Index Scan using document_p2020_05_date_idx on document_p2020_05 d_18 (cost=0.43..24.44 rows=8 width=70) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
30. 0.007 0.007 ↓ 0.0 0 1

Index Scan using document_p2020_06_date_idx on document_p2020_06 d_19 (cost=0.43..28.09 rows=9 width=71) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
31. 0.008 0.008 ↓ 0.0 0 1

Index Scan using document_p2020_07_date_idx on document_p2020_07 d_20 (cost=0.43..35.44 rows=10 width=73) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
32. 0.110 0.110 ↓ 0.0 0 1

Index Scan using document_p2020_08_date_idx on document_p2020_08 d_21 (cost=0.43..30.52 rows=9 width=74) (actual time=0.110..0.110 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
  • Rows Removed by Filter: 26
33. 0.024 0.024 ↓ 0.0 0 1

Index Scan using document_p2020_09_date_idx on document_p2020_09 d_22 (cost=0.43..60.80 rows=14 width=78) (actual time=0.024..0.024 rows=0 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
  • Rows Removed by Filter: 2
34. 96.894 247.595 ↓ 1.5 21,205 1

Bitmap Heap Scan on document_p2020_10 d_23 (cost=11,634.91..25,695.47 rows=13,849 width=81) (actual time=156.462..247.595 rows=21,205 loops=1)

  • Recheck Cond: (((type)::text = 'SHIPMENT'::text) AND (date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: ((NOT deleted) OR (deleted IS NULL))
  • Rows Removed by Filter: 1,283
  • Heap Blocks: exact=32,238
35. 3.400 150.701 ↓ 0.0 0 1

BitmapAnd (cost=11,634.91..11,634.91 rows=13,997 width=0) (actual time=150.701..150.701 rows=0 loops=1)

36. 21.064 21.064 ↓ 1.2 113,730 1

Bitmap Index Scan on document_p2020_10_type_idx (cost=0.00..1,551.83 rows=93,170 width=0) (actual time=21.064..21.064 rows=113,730 loops=1)

  • Index Cond: ((type)::text = 'SHIPMENT'::text)
37. 126.237 126.237 ↓ 3.1 1,958,100 1

Bitmap Index Scan on document_p2020_10_date_idx (cost=0.00..10,075.90 rows=631,457 width=0) (actual time=126.236..126.237 rows=1,958,100 loops=1)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
38. 0.006 0.006 ↓ 0.0 0 1

Index Scan using document_p2020_11_type_idx on document_p2020_11 d_24 (cost=0.14..2.37 rows=1 width=204) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((type)::text = 'SHIPMENT'::text)
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND (date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
39. 127.230 127.230 ↓ 0.0 0 21,205

Index Scan using shipment_pkey on shipment s (cost=0.43..1.92 rows=1 width=102) (actual time=0.006..0.006 rows=0 loops=21,205)

  • Index Cond: (uuid = d.uuid)
  • Filter: ((branch_from_code)::text = '424'::text)
  • Rows Removed by Filter: 1
40. 3.474 3.474 ↑ 1.0 1 386

Index Scan using pk_shipment_cargo_place_amount_and_weight_doc_uuid on shipment_cargo_place_amount_and_weight amount_weight (cost=0.43..1.62 rows=1 width=26) (actual time=0.009..0.009 rows=1 loops=386)

  • Index Cond: (document_uuid = s.uuid)
41. 4,569.694 11,523.644 ↓ 6.5 295,739 386

Materialize (cost=0.55..199,606.02 rows=45,320 width=24) (actual time=0.001..29.854 rows=295,739 loops=386)

42. 26.619 6,953.950 ↓ 6.6 299,691 1

Subquery Scan on sync (cost=0.55..199,379.42 rows=45,320 width=24) (actual time=0.058..6,953.950 rows=299,691 loops=1)

43. 161.597 6,927.331 ↓ 6.6 299,691 1

GroupAggregate (cost=0.55..198,926.22 rows=45,320 width=24) (actual time=0.057..6,927.331 rows=299,691 loops=1)

  • Group Key: sync_sked.document_uuid
44. 6,765.734 6,765.734 ↑ 1.0 998,648 1

Index Only Scan using sync_sked_doc_idx on sync_sked (cost=0.55..193,432.95 rows=1,008,014 width=16) (actual time=0.052..6,765.734 rows=998,648 loops=1)

  • Heap Fetches: 10,902,579
45. 45.934 45.934 ↓ 0.0 0 386

Index Scan using problem_doc_idx on problem sync_problem (cost=0.56..30.01 rows=22 width=32) (actual time=0.065..0.119 rows=0 loops=386)

  • Index Cond: (document_uuid = s.uuid)
  • Filter: ((operation_type)::text = 'SYNCHRONIZATION'::text)
46. 5.404 289.886 ↑ 2,522.0 1 386

GroupAggregate (cost=1.71..71,757.23 rows=2,522 width=48) (actual time=0.751..0.751 rows=1 loops=386)

  • Group Key: lnk.document_uuid
47. 6.650 284.482 ↑ 188.8 160 386

Nested Loop Left Join (cost=1.71..71,656.51 rows=30,200 width=16) (actual time=0.113..0.737 rows=160 loops=386)

48. 3.168 46.320 ↑ 130.0 7 386

Nested Loop (cost=1.13..6,824.60 rows=910 width=32) (actual time=0.059..0.120 rows=7 loops=386)

49. 21.616 21.616 ↑ 363.6 7 386

Index Only Scan using document_cargo_place_lnk_document_uuid_cargo_place_uuid_key on document_cargo_place_lnk lnk (cost=0.70..138.73 rows=2,545 width=32) (actual time=0.047..0.056 rows=7 loops=386)

  • Index Cond: (document_uuid = d.uuid)
  • Heap Fetches: 2,693
50. 21.536 21.536 ↑ 1.0 1 2,692

Index Scan using document_consolidation_cargo_place_uuid_idx on document_consolidation consolidation (cost=0.43..2.62 rows=1 width=32) (actual time=0.008..0.008 rows=1 loops=2,692)

  • Index Cond: (cargo_place_uuid = lnk.cargo_place_uuid)
51. 231.512 231.512 ↑ 110.7 23 2,692

Index Scan using doc_cp_lnk_document_uuid_idx on document_cargo_place_lnk consolidation_cargo_lnk (cost=0.57..45.79 rows=2,545 width=32) (actual time=0.062..0.086 rows=23 loops=2,692)

  • Index Cond: (document_uuid = consolidation.uuid)
52. 1.158 25.090 ↑ 1.0 1 386

Aggregate (cost=6,643.17..6,643.18 rows=1 width=1) (actual time=0.065..0.065 rows=1 loops=386)

53. 1.228 23.932 ↑ 62.3 7 386

Nested Loop (cost=1.13..6,642.08 rows=436 width=1) (actual time=0.016..0.062 rows=7 loops=386)

54. 3.860 3.860 ↑ 363.6 7 386

Index Only Scan using document_cargo_place_lnk_document_uuid_cargo_place_uuid_key on document_cargo_place_lnk lnk_1 (cost=0.70..138.73 rows=2,545 width=16) (actual time=0.005..0.010 rows=7 loops=386)

  • Index Cond: (document_uuid = d.uuid)
  • Heap Fetches: 2,693
55. 18.844 18.844 ↑ 1.0 1 2,692

Index Scan using cargo_place_consolidation_pkey on cargo_place_consolidation cpc (cost=0.43..2.56 rows=1 width=17) (actual time=0.007..0.007 rows=1 loops=2,692)

  • Index Cond: (uuid = lnk_1.cargo_place_uuid)
56. 0.000 0.000 ↓ 0.0

Unique (cost=2,877,664,228.97..2,877,689,026.53 rows=431,262 width=202) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Sort (cost=2,877,664,228.97..2,877,665,307.12 rows=431,262 width=202) (actual rows= loops=)

  • Sort Key: s.uuid, d.external_id, d.sked_number, d.date, s.date_of_sending, s.date_of_meeting, s.planned_date_of_meeting, s.waybill_number, s.branch_to_code, s.carrier_code, s.transport_type_code, s.flight_code, d.date_closed, d.number, d.description, s.fact_weight, s.volume, amount_weight.cargo_place_amount, amount_weight.design_weight, sync.sync_count, sync_problem.uuid, (bool_or(cpc.urgent))
58. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=6,646.84..2,877,598,828.01 rows=431,262 width=202) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.67..12,638,772.08 rows=431,262 width=217) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.96..371,806.78 rows=171 width=217) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.41..366,634.82 rows=171 width=201) (actual rows= loops=)

  • Join Filter: (sync.document_uuid = s.uuid)
62. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.85..52,981.14 rows=171 width=193) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..52,704.28 rows=171 width=183) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Append (cost=0.00..25,973.63 rows=13,902 width=81) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Seq Scan on document_p2018_11 d (cost=0.00..1.16 rows=1 width=73) (actual rows= loops=)

  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND (date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date) AND ((type)::text = 'SHIPMENT'::text))
66. 0.000 0.000 ↓ 0.0

Index Scan using document_p2018_12_date_idx on document_p2018_12 d_1 (cost=0.28..2.50 rows=1 width=65) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
67. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_01_date_idx on document_p2019_01 d_2 (cost=0.29..2.51 rows=1 width=66) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
68. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_02_date_idx on document_p2019_02 d_3 (cost=0.29..2.51 rows=1 width=67) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
69. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_03_date_idx on document_p2019_03 d_4 (cost=0.29..2.51 rows=1 width=66) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
70. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_04_date_idx on document_p2019_04 d_5 (cost=0.29..2.51 rows=1 width=67) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
71. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_05_date_idx on document_p2019_05 d_6 (cost=0.29..2.52 rows=1 width=67) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
72. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_06_date_idx on document_p2019_06 d_7 (cost=0.42..2.96 rows=1 width=66) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
73. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_07_date_idx on document_p2019_07 d_8 (cost=0.42..2.64 rows=1 width=66) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
74. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_08_date_idx on document_p2019_08 d_9 (cost=0.42..2.64 rows=1 width=66) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
75. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_09_date_idx on document_p2019_09 d_10 (cost=0.42..2.65 rows=1 width=67) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
76. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_10_date_idx on document_p2019_10 d_11 (cost=0.43..10.19 rows=5 width=68) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
77. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_11_date_idx on document_p2019_11 d_12 (cost=0.43..15.79 rows=8 width=75) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
78. 0.000 0.000 ↓ 0.0

Index Scan using document_p2019_12_date_idx on document_p2019_12 d_13 (cost=0.43..16.24 rows=7 width=69) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
79. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_01_date_idx on document_p2020_01 d_14 (cost=0.43..14.04 rows=7 width=69) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
80. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_02_date_idx on document_p2020_02 d_15 (cost=0.43..15.41 rows=8 width=69) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
81. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_03_date_idx on document_p2020_03 d_16 (cost=0.43..11.38 rows=6 width=69) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
82. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_04_date_idx on document_p2020_04 d_17 (cost=0.43..12.78 rows=7 width=69) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
83. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_05_date_idx on document_p2020_05 d_18 (cost=0.43..24.44 rows=8 width=70) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
84. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_06_date_idx on document_p2020_06 d_19 (cost=0.43..28.09 rows=9 width=71) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
85. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_07_date_idx on document_p2020_07 d_20 (cost=0.43..35.44 rows=10 width=73) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
86. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_08_date_idx on document_p2020_08 d_21 (cost=0.43..30.52 rows=9 width=74) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
87. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_09_date_idx on document_p2020_09 d_22 (cost=0.43..60.80 rows=14 width=78) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND ((type)::text = 'SHIPMENT'::text))
88. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on document_p2020_10 d_23 (cost=11,596.28..25,599.54 rows=13,792 width=81) (actual rows= loops=)

  • Recheck Cond: (((type)::text = 'SHIPMENT'::text) AND (date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
  • Filter: ((NOT deleted) OR (deleted IS NULL))
89. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=11,596.28..11,596.28 rows=13,940 width=0) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on document_p2020_10_type_idx (cost=0.00..1,547.87 rows=92,789 width=0) (actual rows= loops=)

  • Index Cond: ((type)::text = 'SHIPMENT'::text)
91. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on document_p2020_10_date_idx (cost=0.00..10,041.26 rows=628,873 width=0) (actual rows= loops=)

  • Index Cond: ((date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
92. 0.000 0.000 ↓ 0.0

Index Scan using document_p2020_11_type_idx on document_p2020_11 d_24 (cost=0.14..2.37 rows=1 width=204) (actual rows= loops=)

  • Index Cond: ((type)::text = 'SHIPMENT'::text)
  • Filter: (((NOT deleted) OR (deleted IS NULL)) AND (date >= '2020-10-08'::date) AND (date <= '2020-10-11'::date))
93. 0.000 0.000 ↓ 0.0

Index Scan using shipment_pkey on shipment s (cost=0.43..1.92 rows=1 width=102) (actual rows= loops=)

  • Index Cond: (uuid = d.uuid)
  • Filter: ((branch_from_code)::text = '424'::text)
94. 0.000 0.000 ↓ 0.0

Index Scan using pk_shipment_cargo_place_amount_and_weight_doc_uuid on shipment_cargo_place_amount_and_weight amount_weight (cost=0.43..1.62 rows=1 width=26) (actual rows= loops=)

  • Index Cond: (document_uuid = s.uuid)
95. 0.000 0.000 ↓ 0.0

Materialize (cost=0.55..197,521.18 rows=45,320 width=24) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Subquery Scan on sync (cost=0.55..197,294.58 rows=45,320 width=24) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.55..196,841.38 rows=45,320 width=24) (actual rows= loops=)

  • Group Key: sync_sked.document_uuid
98. 0.000 0.000 ↓ 0.0

Index Only Scan using sync_sked_doc_idx on sync_sked (cost=0.55..191,382.57 rows=1,001,122 width=16) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Index Scan using problem_doc_idx on problem sync_problem (cost=0.56..30.03 rows=22 width=32) (actual rows= loops=)

  • Index Cond: (document_uuid = s.uuid)
  • Filter: ((operation_type)::text = 'SYNCHRONIZATION'::text)
100. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1.71..71,686.20 rows=2,522 width=48) (actual rows= loops=)

  • Group Key: lnk.document_uuid
101. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.71..71,585.53 rows=30,180 width=16) (actual rows= loops=)

102. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..6,824.60 rows=909 width=32) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Index Only Scan using document_cargo_place_lnk_document_uuid_cargo_place_uuid_key on document_cargo_place_lnk lnk (cost=0.70..138.73 rows=2,545 width=32) (actual rows= loops=)

  • Index Cond: (document_uuid = d.uuid)
104. 0.000 0.000 ↓ 0.0

Index Scan using document_consolidation_cargo_place_uuid_idx on document_consolidation consolidation (cost=0.43..2.62 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (cargo_place_uuid = lnk.cargo_place_uuid)
105. 0.000 0.000 ↓ 0.0

Index Scan using doc_cp_lnk_document_uuid_idx on document_cargo_place_lnk consolidation_cargo_lnk (cost=0.57..45.79 rows=2,545 width=32) (actual rows= loops=)

  • Index Cond: (document_uuid = consolidation.uuid)
106. 0.000 0.000 ↓ 0.0

Aggregate (cost=6,643.17..6,643.18 rows=1 width=1) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..6,642.08 rows=435 width=1) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Index Only Scan using document_cargo_place_lnk_document_uuid_cargo_place_uuid_key on document_cargo_place_lnk lnk_1 (cost=0.70..138.73 rows=2,545 width=16) (actual rows= loops=)

  • Index Cond: (document_uuid = d.uuid)
109. 0.000 0.000 ↓ 0.0

Index Scan using cargo_place_consolidation_pkey on cargo_place_consolidation cpc (cost=0.43..2.56 rows=1 width=17) (actual rows= loops=)

  • Index Cond: (uuid = lnk_1.cargo_place_uuid)
Planning time : 12.938 ms
Execution time : 19,456.072 ms