explain.depesz.com

PostgreSQL's explain analyze made readable

Result: j4gJ

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

Limit (cost=2,877,664,228.97..2,877,664,234.72 rows=100 width=202) (actual rows= loops=)

2. 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=)

3. 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))
4. 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=)

5. 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=)

6. 0.000 0.000 ↓ 0.0

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

7. 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)
8. 0.000 0.000 ↓ 0.0

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

9. 0.000 0.000 ↓ 0.0

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

10. 0.000 0.000 ↓ 0.0

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

11. 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))
12. 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))
13. 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))
14. 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))
15. 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))
16. 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))
17. 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))
18. 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))
19. 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))
20. 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))
21. 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))
22. 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))
23. 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))
24. 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))
25. 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))
26. 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))
27. 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))
28. 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))
29. 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))
30. 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))
31. 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))
32. 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))
33. 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))
34. 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))
35. 0.000 0.000 ↓ 0.0

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

36. 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)
37. 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))
38. 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))
39. 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)
40. 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)
41. 0.000 0.000 ↓ 0.0

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

42. 0.000 0.000 ↓ 0.0

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

43. 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
44. 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=)

45. 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)
46. 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
47. 0.000 0.000 ↓ 0.0

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

48. 0.000 0.000 ↓ 0.0

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

49. 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)
50. 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)
51. 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)
52. 0.000 0.000 ↓ 0.0

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

53. 0.000 0.000 ↓ 0.0

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

54. 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)
55. 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)