explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HTYZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 57,345.454 ↓ 14.5 29 1

Subquery Scan on vw_invoices_all_picking (cost=60,364.09..60,364.11 rows=2 width=589) (actual time=57,345.427..57,345.454 rows=29 loops=1)

2. 0.351 57,345.427 ↓ 14.5 29 1

Sort (cost=60,364.09..60,364.09 rows=2 width=593) (actual time=57,345.422..57,345.427 rows=29 loops=1)

  • Sort Key: vw_invoices_all_base.has_changed DESC, ((vw_invoices_all_base."time")::date), vw_invoices_all_base.is_rushed DESC, vw_invoices_all_base."time", vw_invoices_all_base.lane, vw_invoices_all_base.customer_priority, vw_invoices_all_base.invoice_priority
  • Sort Method: quicksort Memory: 38kB
3. 0.111 57,345.076 ↓ 14.5 29 1

Subquery Scan on vw_invoices_all_base (cost=40,484.23..60,364.08 rows=2 width=593) (actual time=918.474..57,345.076 rows=29 loops=1)

4. 0.872 57,344.965 ↓ 14.5 29 1

Nested Loop Left Join (cost=40,484.23..60,364.05 rows=2 width=589) (actual time=918.470..57,344.965 rows=29 loops=1)

  • Join Filter: ((inwh_1.autoid)::text = (inwh.autoid)::text)
5. 0.095 57,329.535 ↓ 14.5 29 1

Hash Left Join (cost=40,484.23..55,210.92 rows=2 width=560) (actual time=917.947..57,329.535 rows=29 loops=1)

  • Hash Cond: (pick_jobs.id = vw_jobs_shelved.pick_job)
6. 0.117 57,329.314 ↓ 14.5 29 1

Nested Loop Left Join (cost=40,464.34..55,191.02 rows=2 width=552) (actual time=917.809..57,329.314 rows=29 loops=1)

7. 0.706 57,328.820 ↓ 14.5 29 1

Merge Left Join (cost=40,464.07..55,171.56 rows=2 width=548) (actual time=917.793..57,328.820 rows=29 loops=1)

  • Merge Cond: ((arinvdet.doc_aid)::text = (pick_jobs_deleted.original_invoice)::text)
  • Join Filter: ((pick_jobs_deleted.original_warehouse)::text = (inwh_1.autoid)::text)
8. 0.205 57,314.937 ↓ 29.0 29 1

Nested Loop Left Join (cost=38,973.57..53,674.16 rows=1 width=530) (actual time=905.953..57,314.937 rows=29 loops=1)

9. 0.782 57,314.210 ↓ 29.0 29 1

Merge Left Join (cost=38,973.29..53,670.95 rows=1 width=536) (actual time=905.934..57,314.210 rows=29 loops=1)

  • Merge Cond: ((arinvdet.doc_aid)::text = (pick_jobs_updated.original_invoice)::text)
  • Join Filter: ((pick_jobs_updated.original_warehouse)::text = (inwh_1.autoid)::text)
10. 0.121 57,305.001 ↓ 29.0 29 1

Nested Loop Left Join (cost=38,792.21..53,489.56 rows=1 width=532) (actual time=898.989..57,305.001 rows=29 loops=1)

11. 0.180 57,304.764 ↓ 29.0 29 1

Nested Loop (cost=38,792.06..53,489.25 rows=1 width=519) (actual time=898.984..57,304.764 rows=29 loops=1)

  • Join Filter: (NOT COALESCE(CASE WHEN (true) THEN ((arinv.ship_date <> pick_jobs.original_ship_date) OR ((arinv.ship_via)::text <> (pick_jobs.original_ship_method)::text)) ELSE true END, false))
12. 4,176.870 57,303.870 ↓ 8.5 34 1

Nested Loop (cost=38,791.65..53,478.80 rows=4 width=257) (actual time=898.947..57,303.870 rows=34 loops=1)

  • Join Filter: ((arinvdet.doc_aid)::text = (scheduled_invoices.invoice_autoid)::text)
  • Rows Removed by Join Filter: 9365066
13. 4.022 326.810 ↓ 530.0 530 1

Nested Loop Left Join (cost=11,506.41..11,565.44 rows=1 width=88) (actual time=299.738..326.810 rows=530 loops=1)

  • Filter: (pick_jobs.finished IS NULL)
  • Rows Removed by Filter: 130
14. 2.437 307.608 ↓ 94.3 660 1

Group (cost=11,505.99..11,506.24 rows=7 width=49) (actual time=299.686..307.608 rows=660 loops=1)

  • Group Key: arinvdet.doc_aid, inwh_1.autoid
15. 3.962 305.171 ↓ 437.3 3,061 1

Unique (cost=11,505.99..11,506.13 rows=7 width=154) (actual time=299.684..305.171 rows=3,061 loops=1)

16. 15.553 301.209 ↓ 437.3 3,061 1

Sort (cost=11,505.99..11,506.01 rows=7 width=154) (actual time=299.682..301.209 rows=3,061 loops=1)

  • Sort Key: arinvdet.doc_aid, arinvdet.autoid, arinvdet.descr, arinvdet.unit_meas, ((gbl_functions.fn_mainunit_to_uom_qty(inventry.id, arinvdet.unit_meas, arinvdet.quan))::integer), ((NULLIF((arinvdet.gpar_time)::text, ''::text))::character varying), (COALESCE(pick_transactions.qty_shipped, 0))
  • Sort Method: quicksort Memory: 758kB
17. 82.139 285.656 ↓ 437.3 3,061 1

Nested Loop Left Join (cost=1.14..11,505.89 rows=7 width=154) (actual time=1.804..285.656 rows=3,061 loops=1)

18. 2.257 175.968 ↓ 437.3 3,061 1

Nested Loop (cost=0.71..11,499.13 rows=7 width=132) (actual time=1.703..175.968 rows=3,061 loops=1)

19. 1.590 142.701 ↓ 387.6 3,101 1

Nested Loop (cost=0.43..11,496.40 rows=8 width=130) (actual time=1.688..142.701 rows=3,101 loops=1)

  • Join Filter: ((arinvdet.warehouse)::text = (inwh_1.warehouse)::text)
20. 0.015 0.015 ↑ 1.0 1 1

Seq Scan on inwh inwh_1 (cost=0.00..1.05 rows=1 width=64) (actual time=0.013..0.015 rows=1 loops=1)

  • Filter: ((autoid)::text = '2GA89EVTVE3SGAD1'::text)
  • Rows Removed by Filter: 3
21. 3.502 141.096 ↓ 81.6 3,101 1

Nested Loop (cost=0.43..11,494.87 rows=38 width=105) (actual time=1.665..141.096 rows=3,101 loops=1)

22. 126.289 126.289 ↓ 83.1 665 1

Seq Scan on arinv arinv_1 (cost=0.00..10,944.11 rows=8 width=17) (actual time=1.637..126.289 rows=665 loops=1)

  • Filter: ((is_rma IS NOT TRUE) AND (progress < '80'::numeric) AND ((status)::text = 'U'::text))
  • Rows Removed by Filter: 106344
23. 11.305 11.305 ↑ 1.2 5 665

Index Scan using arinvdet_docaid_idx on arinvdet (cost=0.43..68.79 rows=6 width=105) (actual time=0.012..0.017 rows=5 loops=665)

  • Index Cond: ((doc_aid)::text = (arinv_1.autoid)::text)
  • Filter: ((quan > 0.0) AND ((id)::text !~~ '($)%'::text))
  • Rows Removed by Filter: 0
24. 31.010 31.010 ↑ 1.0 1 3,101

Index Scan using idx_btree_inventry_id on inventry (cost=0.29..0.33 rows=1 width=12) (actual time=0.009..0.010 rows=1 loops=3,101)

  • Index Cond: ((id)::text = (arinvdet.inven)::text)
  • Filter: (((c_type <> 1.0) OR (auto_cost IS NOT TRUE)) AND (discou_typ <= 0))
  • Rows Removed by Filter: 0
25. 27.549 27.549 ↓ 0.0 0 3,061

Index Scan using uc_item on pick_transactions (cost=0.42..0.71 rows=1 width=21) (actual time=0.009..0.009 rows=0 loops=3,061)

  • Index Cond: ((arinvdet.autoid)::text = (item)::text)
26. 15.180 15.180 ↓ 0.0 0 660

Index Scan using uc_invoice_warehouse on pick_jobs (cost=0.41..8.44 rows=1 width=106) (actual time=0.023..0.023 rows=0 loops=660)

  • Index Cond: (((arinvdet.doc_aid)::text = (invoice)::text) AND ((inwh_1.autoid)::text = (warehouse)::text) AND ((warehouse)::text = '2GA89EVTVE3SGAD1'::text))
27. 2,567.320 52,800.190 ↑ 1.0 17,670 530

Append (cost=27,285.24..41,509.37 rows=17,955 width=209) (actual time=0.505..99.623 rows=17,670 loops=530)

28.          

CTE scheduled_invoices

29. 1.932 281.884 ↑ 1.3 499 1

Nested Loop Left Join (cost=15,738.79..16,341.14 rows=660 width=124) (actual time=266.216..281.884 rows=499 loops=1)

30. 15.238 279.453 ↑ 1.3 499 1

Merge Left Join (cost=15,738.51..16,100.09 rows=660 width=147) (actual time=266.158..279.453 rows=499 loops=1)

  • Merge Cond: (((arinv_3.invoice)::text = ((invoice.invoice_id)::text)) AND (arinv_3.company = ((invoice.company)::text)))
31. 1.939 98.563 ↑ 1.3 499 1

Sort (cost=13,180.47..13,182.12 rows=660 width=144) (actual time=98.454..98.563 rows=499 loops=1)

  • Sort Key: arinv_3.invoice, arinv_3.company
  • Sort Method: quicksort Memory: 95kB
32. 0.881 96.624 ↑ 1.3 499 1

Hash Left Join (cost=1,476.16..13,149.56 rows=660 width=144) (actual time=26.084..96.624 rows=499 loops=1)

  • Hash Cond: ((arinv_3.ship_cat = customer_entry.ship_cat) AND (arinv_3.ship_date = customer_entry.date) AND ((((COALESCE((arinv_3.c_id)::text, ''::text) || COALESCE((arinv_3.c_zip)::text, ''::text)) || '_'::text) || COALESCE((arinv_3.c_address1)::text, ''::text)) = (customer_entry.sch_cust_id)::text))
  • Filter: ((arinv_3.ship_cat > 2) OR (customer_entry.load_id IS NOT NULL))
  • Rows Removed by Filter: 80
33. 0.687 69.844 ↑ 1.2 579 1

Subquery Scan on arinv_3 (cost=0.29..11,667.83 rows=710 width=232) (actual time=0.024..69.844 rows=579 loops=1)

  • Filter: (arinv_3.progress >= '40'::numeric)
  • Rows Removed by Filter: 1474
34. 0.691 69.157 ↑ 1.0 2,053 1

Append (cost=0.29..11,641.21 rows=2,130 width=1,206) (actual time=0.022..69.157 rows=2,053 loops=1)

35. 0.407 0.407 ↓ 1.1 188 1

Index Scan using idx_btree_arinv_status on arinv arinv_4 (cost=0.29..52.75 rows=169 width=395) (actual time=0.021..0.407 rows=188 loops=1)

  • Index Cond: ((status)::text = 'U'::text)
36. 0.480 2.190 ↑ 1.0 982 1

Subquery Scan on *SELECT* 2_1 (cost=0.42..523.80 rows=1,025 width=442) (actual time=0.026..2.190 rows=982 loops=1)

37. 1.710 1.710 ↑ 1.0 982 1

Index Scan using arinv_status_idx on arinv arinv_5 (cost=0.42..513.55 rows=1,025 width=450) (actual time=0.024..1.710 rows=982 loops=1)

  • Index Cond: ((status)::text = 'U'::text)
38. 64.285 64.285 ↑ 1.1 883 1

Seq Scan on arinv arinv_6 (cost=0.00..10,676.59 rows=935 width=447) (actual time=0.710..64.285 rows=883 loops=1)

  • Filter: ((status)::text = 'U'::text)
  • Rows Removed by Filter: 106126
39. 0.002 1.584 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4 (cost=0.00..377.02 rows=1 width=630) (actual time=1.584..1.584 rows=0 loops=1)

40. 1.582 1.582 ↓ 0.0 0 1

Seq Scan on arinv arinv_7 (cost=0.00..377.01 rows=1 width=602) (actual time=1.582..1.582 rows=0 loops=1)

  • Filter: ((status)::text = 'U'::text)
  • Rows Removed by Filter: 3441
41. 14.743 25.899 ↑ 1.0 32,577 1

Hash (cost=905.77..905.77 rows=32,577 width=41) (actual time=25.899..25.899 rows=32,577 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2689kB
42. 11.156 11.156 ↑ 1.0 32,577 1

Seq Scan on customer_entry (cost=0.00..905.77 rows=32,577 width=41) (actual time=0.021..11.156 rows=32,577 loops=1)

43. 147.480 165.652 ↑ 1.0 27,857 1

Sort (cost=2,558.04..2,627.79 rows=27,899 width=23) (actual time=160.518..165.652 rows=27,857 loops=1)

  • Sort Key: ((invoice.invoice_id)::text), ((invoice.company)::text)
  • Sort Method: quicksort Memory: 2955kB
44. 18.172 18.172 ↑ 1.0 27,899 1

Seq Scan on invoice (cost=0.00..497.99 rows=27,899 width=23) (actual time=0.017..18.172 rows=27,899 loops=1)

45. 0.499 0.499 ↑ 1.0 1 499

Index Scan using uc_id_date on load (cost=0.28..0.31 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=499)

  • Index Cond: (id = customer_entry.load_id)
46.          

CTE rushed_invoices

47. 117.324 117.324 ↑ 1.1 11 1

Seq Scan on arinv arinv_8 (cost=0.00..10,944.11 rows=12 width=21) (actual time=4.105..117.324 rows=11 loops=1)

  • Filter: (is_rushed AND (progress >= '30'::numeric) AND ((status)::text = 'U'::text))
  • Rows Removed by Filter: 106998
48. 379.480 379.480 ↑ 1.3 499 530

CTE Scan on scheduled_invoices (cost=0.00..13.20 rows=660 width=235) (actual time=0.505..0.716 rows=499 loops=530)

49. 1.060 125.610 ↑ 6.0 1 530

Subquery Scan on *SELECT* 2 (cost=21.45..21.98 rows=6 width=209) (actual time=0.173..0.237 rows=1 loops=530)

50. 5.028 124.550 ↑ 6.0 1 530

Hash Anti Join (cost=21.45..21.91 rows=6 width=205) (actual time=0.171..0.235 rows=1 loops=530)

  • Hash Cond: ((rushed_invoices.autoid)::text = (scheduled_invoices_1.invoice_autoid)::text)
51. 119.250 119.250 ↑ 1.1 11 530

CTE Scan on rushed_invoices (cost=0.00..0.24 rows=12 width=36) (actual time=0.009..0.225 rows=11 loops=530)

52. 0.140 0.272 ↑ 1.3 499 1

Hash (cost=13.20..13.20 rows=660 width=32) (actual time=0.272..0.272 rows=499 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 32kB
53. 0.132 0.132 ↑ 1.3 499 1

CTE Scan on scheduled_invoices scheduled_invoices_1 (cost=0.00..13.20 rows=660 width=32) (actual time=0.001..0.132 rows=499 loops=1)

54. 3,864.218 49,727.780 ↑ 1.0 17,170 530

Hash Anti Join (cost=21.84..14,009.46 rows=17,289 width=194) (actual time=24.869..93.826 rows=17,170 loops=530)

  • Hash Cond: ((pick_jobs_1.invoice)::text = (rushed_invoices_1.autoid)::text)
55. 3,539.043 45,863.550 ↑ 1.0 17,171 530

Hash Anti Join (cost=21.45..13,790.77 rows=17,295 width=17) (actual time=24.866..86.535 rows=17,171 loops=530)

  • Hash Cond: ((pick_jobs_1.invoice)::text = (scheduled_invoices_2.invoice_autoid)::text)
56. 42,324.210 42,324.210 ↑ 2.0 17,310 530

Seq Scan on pick_jobs pick_jobs_1 (cost=0.00..12,080.90 rows=34,590 width=17) (actual time=24.862..79.857 rows=17,310 loops=530)

57. 0.154 0.297 ↑ 1.3 499 1

Hash (cost=13.20..13.20 rows=660 width=32) (actual time=0.296..0.297 rows=499 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 32kB
58. 0.143 0.143 ↑ 1.3 499 1

CTE Scan on scheduled_invoices scheduled_invoices_2 (cost=0.00..13.20 rows=660 width=32) (actual time=0.003..0.143 rows=499 loops=1)

59. 0.007 0.012 ↑ 1.1 11 1

Hash (cost=0.24..0.24 rows=12 width=32) (actual time=0.012..0.012 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
60. 0.005 0.005 ↑ 1.1 11 1

CTE Scan on rushed_invoices rushed_invoices_1 (cost=0.00..0.24 rows=12 width=32) (actual time=0.001..0.005 rows=11 loops=1)

61. 0.714 0.714 ↑ 1.0 1 34

Index Scan using arinv_pkey on arinv (cost=0.42..2.60 rows=1 width=279) (actual time=0.021..0.021 rows=1 loops=34)

  • Index Cond: ((autoid)::text = (scheduled_invoices.invoice_autoid)::text)
  • Filter: ((is_rma IS NOT TRUE) AND (progress < '80'::numeric) AND (progress < 60.0))
  • Rows Removed by Filter: 0
62. 0.116 0.116 ↓ 0.0 0 29

Index Scan using user_pkey on "user" (cost=0.14..0.30 rows=1 width=17) (actual time=0.004..0.004 rows=0 loops=29)

  • Index Cond: (pick_jobs."current_user" = id)
63. 0.443 8.427 ↓ 80.8 1,212 1

Materialize (cost=181.08..181.34 rows=15 width=71) (actual time=6.925..8.427 rows=1,212 loops=1)

64. 0.622 7.984 ↓ 80.8 1,212 1

Unique (cost=181.08..181.15 rows=15 width=79) (actual time=6.921..7.984 rows=1,212 loops=1)

65. 5.699 7.362 ↓ 95.7 1,436 1

Sort (cost=181.08..181.12 rows=15 width=79) (actual time=6.919..7.362 rows=1,436 loops=1)

  • Sort Key: pick_jobs_updated.original_invoice, pick_jobs_updated.time_updated DESC NULLS LAST
  • Sort Method: quicksort Memory: 170kB
66. 0.621 1.663 ↓ 103.3 1,549 1

Bitmap Heap Scan on pick_jobs_updated (cost=127.47..180.79 rows=15 width=79) (actual time=1.066..1.663 rows=1,549 loops=1)

  • Recheck Cond: ((original_warehouse)::text = '2GA89EVTVE3SGAD1'::text)
  • Heap Blocks: exact=19
67. 1.042 1.042 ↓ 103.3 1,549 1

Bitmap Index Scan on idx_btree_originalinvoice_originalwarehouse_timeupdated (cost=0.00..127.46 rows=15 width=0) (actual time=1.042..1.042 rows=1,549 loops=1)

  • Index Cond: ((original_warehouse)::text = '2GA89EVTVE3SGAD1'::text)
68. 0.522 0.522 ↑ 1.0 1 29

Index Scan using arcust_id_idx on arcust (cost=0.29..3.19 rows=1 width=8) (actual time=0.017..0.018 rows=1 loops=29)

  • Index Cond: ((arinv.id)::text = (id)::text)
69. 0.393 13.177 ↓ 3.3 1,134 1

Materialize (cost=1,490.49..1,496.51 rows=344 width=85) (actual time=11.815..13.177 rows=1,134 loops=1)

70. 0.567 12.784 ↓ 3.3 1,134 1

Unique (cost=1,490.49..1,492.21 rows=344 width=93) (actual time=11.806..12.784 rows=1,134 loops=1)

71. 5.434 12.217 ↓ 3.9 1,336 1

Sort (cost=1,490.49..1,491.35 rows=344 width=93) (actual time=11.804..12.217 rows=1,336 loops=1)

  • Sort Key: pick_jobs_deleted.original_invoice, pick_jobs_deleted.time_deleted DESC NULLS LAST
  • Sort Method: quicksort Memory: 164kB
72. 6.783 6.783 ↓ 4.2 1,456 1

Seq Scan on pick_jobs_deleted (cost=0.00..1,476.00 rows=344 width=93) (actual time=0.150..6.783 rows=1,456 loops=1)

  • Filter: ((original_warehouse)::text = '2GA89EVTVE3SGAD1'::text)
73. 0.377 0.377 ↓ 0.0 0 29

Index Scan using uc_invoice_warehosue on invoice_pictures (cost=0.27..6.58 rows=1 width=71) (actual time=0.013..0.013 rows=0 loops=29)

  • Index Cond: (((arinvdet.doc_aid)::text = (invoice)::text) AND ((inwh_1.autoid)::text = (warehouse)::text) AND ((warehouse)::text = '2GA89EVTVE3SGAD1'::text))
74. 0.020 0.126 ↓ 9.8 49 1

Hash (cost=19.83..19.83 rows=5 width=12) (actual time=0.126..0.126 rows=49 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
75. 0.019 0.106 ↓ 9.8 49 1

Subquery Scan on vw_jobs_shelved (cost=19.76..19.83 rows=5 width=12) (actual time=0.063..0.106 rows=49 loops=1)

76. 0.018 0.087 ↓ 9.8 49 1

Unique (cost=19.76..19.78 rows=5 width=44) (actual time=0.062..0.087 rows=49 loops=1)

77. 0.030 0.069 ↓ 9.8 49 1

Sort (cost=19.76..19.77 rows=5 width=44) (actual time=0.061..0.069 rows=49 loops=1)

  • Sort Key: pick_jobs_shelved.pick_job, pick_jobs_shelved.shelved_time DESC NULLS LAST
  • Sort Method: quicksort Memory: 27kB
78. 0.039 0.039 ↓ 9.8 49 1

Seq Scan on pick_jobs_shelved (cost=0.00..19.70 rows=5 width=44) (actual time=0.026..0.039 rows=49 loops=1)

  • Filter: (unshelved_time IS NULL)
79. 0.018 0.029 ↑ 1.0 1 29

Materialize (cost=0.00..1.05 rows=1 width=64) (actual time=0.001..0.001 rows=1 loops=29)

80. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on inwh (cost=0.00..1.05 rows=1 width=64) (actual time=0.011..0.011 rows=1 loops=1)

  • Filter: ((autoid)::text = '2GA89EVTVE3SGAD1'::text)
  • Rows Removed by Filter: 2
81.          

SubPlan (forNested Loop Left Join)

82. 0.145 12.354 ↑ 1.0 1 29

Aggregate (cost=95.42..95.43 rows=1 width=8) (actual time=0.426..0.426 rows=1 loops=29)

83. 0.319 12.209 ↓ 4.0 4 29

Unique (cost=95.38..95.40 rows=1 width=154) (actual time=0.418..0.421 rows=4 loops=29)

84. 0.783 11.890 ↓ 4.0 4 29

Sort (cost=95.38..95.39 rows=1 width=154) (actual time=0.410..0.410 rows=4 loops=29)

  • Sort Key: arinvdet_1.autoid, arinvdet_1.descr, arinvdet_1.unit_meas, ((gbl_functions.fn_mainunit_to_uom_qty(inventry_1.id, arinvdet_1.unit_meas, arinvdet_1.quan))::integer), ((NULLIF((arinvdet_1.gpar_time)::text, ''::text))::character varying), (COALESCE(pick_transactions_1.qty_shipped, 0))
  • Sort Method: quicksort Memory: 28kB
85. 5.354 11.107 ↓ 4.0 4 29

Nested Loop Left Join (cost=1.55..95.37 rows=1 width=154) (actual time=0.177..0.383 rows=4 loops=29)

86. 0.134 4.466 ↓ 4.0 4 29

Nested Loop (cost=1.13..86.68 rows=1 width=132) (actual time=0.070..0.154 rows=4 loops=29)

87. 0.324 3.045 ↓ 4.0 4 29

Nested Loop (cost=0.71..78.23 rows=1 width=132) (actual time=0.054..0.105 rows=4 loops=29)

88. 0.493 1.305 ↓ 4.0 4 29

Nested Loop (cost=0.43..69.91 rows=1 width=130) (actual time=0.035..0.045 rows=4 loops=29)

  • Join Filter: ((arinvdet_1.warehouse)::text = (inwh_2.warehouse)::text)
89. 0.145 0.145 ↑ 1.0 1 29

Seq Scan on inwh inwh_2 (cost=0.00..1.05 rows=1 width=64) (actual time=0.004..0.005 rows=1 loops=29)

  • Filter: ((autoid)::text = (inwh_1.autoid)::text)
  • Rows Removed by Filter: 3
90. 0.667 0.667 ↑ 1.5 4 29

Index Scan using arinvdet_docaid_idx on arinvdet arinvdet_1 (cost=0.43..68.79 rows=6 width=105) (actual time=0.018..0.023 rows=4 loops=29)

  • Index Cond: ((doc_aid)::text = (arinvdet.doc_aid)::text)
  • Filter: ((quan > 0.0) AND ((id)::text !~~ '($)%'::text))
  • Rows Removed by Filter: 0
91. 1.416 1.416 ↑ 1.0 1 118

Index Scan using idx_btree_inventry_id on inventry inventry_1 (cost=0.29..8.31 rows=1 width=12) (actual time=0.012..0.012 rows=1 loops=118)

  • Index Cond: ((id)::text = (arinvdet_1.inven)::text)
  • Filter: (((c_type <> 1.0) OR (auto_cost IS NOT TRUE)) AND (discou_typ <= 0))
  • Rows Removed by Filter: 0
92. 1.287 1.287 ↑ 1.0 1 117

Index Scan using arinv_pkey on arinv arinv_2 (cost=0.42..8.44 rows=1 width=17) (actual time=0.010..0.011 rows=1 loops=117)

  • Index Cond: ((autoid)::text = (arinvdet.doc_aid)::text)
  • Filter: ((is_rma IS NOT TRUE) AND (progress < '80'::numeric) AND ((status)::text = 'U'::text))
93. 1.287 1.287 ↓ 0.0 0 117

Index Scan using uc_item on pick_transactions pick_transactions_1 (cost=0.42..8.44 rows=1 width=21) (actual time=0.011..0.011 rows=0 loops=117)

  • Index Cond: ((arinvdet_1.autoid)::text = (item)::text)
94. 0.522 0.812 ↑ 1.0 1 29

Aggregate (cost=2,467.44..2,467.45 rows=1 width=8) (actual time=0.028..0.028 rows=1 loops=29)

95. 0.087 0.290 ↑ 689.0 1 29

Bitmap Heap Scan on pick_transactions pick_transactions_2 (cost=13.76..2,465.72 rows=689 width=17) (actual time=0.010..0.010 rows=1 loops=29)

  • Recheck Cond: (pick_job = pick_jobs.id)
  • Heap Blocks: exact=6
96. 0.203 0.203 ↑ 689.0 1 29

Bitmap Index Scan on idx_btree_picktransactions_pickjob (cost=0.00..13.59 rows=689 width=0) (actual time=0.007..0.007 rows=1 loops=29)

  • Index Cond: (pick_job = pick_jobs.id)
97. 0.783 0.783 ↓ 0.0 0 29

Seq Scan on "user" user_1 (cost=0.00..6.56 rows=1 width=13) (actual time=0.026..0.027 rows=0 loops=29)

  • Filter: (id = pick_jobs_deleted.original_picker)
  • Rows Removed by Filter: 205
98. 0.580 0.580 ↓ 0.0 0 29

Seq Scan on "user" user_1_1 (cost=0.00..6.56 rows=1 width=13) (actual time=0.020..0.020 rows=0 loops=29)

  • Filter: (id = pick_jobs_updated.original_picker)
  • Rows Removed by Filter: 205
Planning time : 14.738 ms
Execution time : 57,347.524 ms