explain.depesz.com

PostgreSQL's explain analyze made readable

Result: syIJ

Settings
# exclusive inclusive rows x rows loops node
1. 122.017 2,294.567 ↓ 7.0 76,143 1

Sort (cost=201,452.37..201,479.56 rows=10,877 width=3,203) (actual time=2,274.273..2,294.567 rows=76,143 loops=1)

  • Sort Key: ('PO'::character varying(10))
  • Sort Method: quicksort Memory: 21893kB
2. 27.729 2,172.550 ↓ 7.0 76,143 1

Append (cost=1,581.66..185,701.12 rows=10,877 width=3,203) (actual time=33.799..2,172.550 rows=76,143 loops=1)

3. 14.502 863.189 ↑ 21.3 223 1

Gather (cost=1,581.66..70,038.38 rows=4,761 width=2,278) (actual time=33.797..863.189 rows=223 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 0.883 848.687 ↑ 26.8 74 3

Hash Left Join (cost=581.66..68,562.28 rows=1,984 width=2,278) (actual time=19.907..848.687 rows=74 loops=3)

  • Hash Cond: (split_part(replace(replace(replace(replace((material_requirements.store_sid)::text, '~'::text, '<SEPARATOR>'::text), '^'::text, '<SEPARATOR>'::text), '!'::text, '<SEPARATOR>'::text), '*'::text, '<SEPARATOR>'::text), '<SEPARATOR>'::text, 1) = (stores.sid)::text)
5. 160.251 842.428 ↑ 26.8 74 3

Nested Loop Left Join (cost=437.08..68,324.44 rows=1,984 width=102) (actual time=14.446..842.428 rows=74 loops=3)

6. 158.415 679.998 ↑ 26.8 74 3

Nested Loop Left Join (cost=436.78..67,315.64 rows=1,984 width=102) (actual time=14.323..679.998 rows=74 loops=3)

7. 2.067 519.431 ↑ 26.8 74 3

Hash Join (cost=436.36..63,848.25 rows=1,984 width=102) (actual time=14.078..519.431 rows=74 loops=3)

  • Hash Cond: ((material_requirements.item_sid)::text = (transfer_orders.item_sid)::text)
8. 511.495 511.495 ↑ 7.6 1,042 3

Parallel Seq Scan on material_requirements (cost=0.00..63,369.10 rows=7,893 width=102) (actual time=1.660..511.495 rows=1,042 loops=3)

  • Filter: ((NOT COALESCE(deleted, false)) AND ((type)::text <> 'M'::text) AND ((COALESCE(type, ''::character varying))::text <> '2'::text) AND ((COALESCE(po_status, '?'::character varying))::text = ANY ('{REGISTERED,ACCEPTED,ORDER_FOR_PACKING,IN_PACKAGING,PACKED,SHIPPED}'::text[])) AND (CASE WHEN (((COALESCE(quantity_amount, '0'::double precision) >= '0'::double precision) AND ((COALESCE(quantity_amount, '0'::double precision) - COALESCE(used_quantity, '0'::double precision)) <= '0'::double precision)) OR ((COALESCE(quantity_amount, '0'::double precision) < '0'::double precision) AND ((COALESCE(quantity_amount, '0'::double precision) - COALESCE(used_quantity, '0'::double precision)) > '0'::double precision))) THEN '0'::double precision ELSE (COALESCE(quantity_amount, '0'::double precision) - COALESCE(used_quantity, '0'::double precision)) END <> '0'::double precision))
  • Rows Removed by Filter: 458843
9. 0.425 5.869 ↑ 1.4 667 3

Hash (cost=424.94..424.94 rows=914 width=11) (actual time=5.869..5.869 rows=667 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
10. 1.231 5.444 ↑ 1.4 667 3

HashAggregate (cost=415.80..424.94 rows=914 width=11) (actual time=5.108..5.444 rows=667 loops=3)

  • Group Key: (transfer_orders.item_sid)::text
11. 4.213 4.213 ↑ 1.0 1,127 3

Seq Scan on transfer_orders (cost=0.00..412.98 rows=1,129 width=11) (actual time=0.057..4.213 rows=1,127 loops=3)

  • Filter: ((status)::text = 'O'::text)
  • Rows Removed by Filter: 2873
12. 2.152 2.152 ↑ 1.0 1 223

Index Scan using order_lines_pkey on order_lines (cost=0.42..1.75 rows=1 width=16) (actual time=2.152..2.152 rows=1 loops=223)

  • Index Cond: (id = material_requirements.order_line_id)
13. 2.179 2.179 ↑ 1.0 1 223

Index Scan using purchase_orders_pkey on purchase_orders (cost=0.29..0.51 rows=1 width=16) (actual time=2.179..2.179 rows=1 loops=223)

  • Index Cond: (order_lines.purchase_order_id = id)
14. 2.526 5.376 ↓ 1.0 3,538 3

Hash (cost=100.37..100.37 rows=3,537 width=21) (actual time=5.375..5.376 rows=3,538 loops=3)

  • Buckets: 4096 Batches: 1 Memory Usage: 219kB
15. 2.850 2.850 ↓ 1.0 3,538 3

Seq Scan on stores (cost=0.00..100.37 rows=3,537 width=21) (actual time=0.083..2.850 rows=3,538 loops=3)

16. 4.008 647.507 ↓ 18.6 55,226 1

Gather (cost=1,590.80..66,058.21 rows=2,964 width=2,278) (actual time=164.858..647.507 rows=55,226 loops=1)

  • Workers Planned: 2
  • Workers Launched: 1
17. 84.398 643.499 ↓ 22.4 27,613 2

Hash Left Join (cost=590.80..64,761.81 rows=1,235 width=2,278) (actual time=151.401..643.499 rows=27,613 loops=2)

  • Hash Cond: (split_part(replace(replace(replace(replace((material_requirements_1.store_sid)::text, '~'::text, '<SEPARATOR>'::text), '^'::text, '<SEPARATOR>'::text), '!'::text, '<SEPARATOR>'::text), '*'::text, '<SEPARATOR>'::text), '<SEPARATOR>'::text, 1) = (stores_1.sid)::text)
18. 28.133 556.247 ↓ 22.4 27,613 2

Nested Loop Left Join (cost=446.22..64,557.64 rows=1,235 width=97) (actual time=148.468..556.247 rows=27,613 loops=2)

19. 33.370 528.114 ↓ 22.4 27,613 2

Nested Loop Left Join (cost=445.92..63,929.69 rows=1,235 width=97) (actual time=148.456..528.114 rows=27,613 loops=2)

20. 41.436 494.744 ↓ 22.4 27,613 2

Hash Join (cost=445.50..61,631.77 rows=1,235 width=97) (actual time=148.428..494.744 rows=27,613 loops=2)

  • Hash Cond: ((material_requirements_1.item_sid)::text = (transfer_orders_1.item_sid)::text)
21. 449.945 449.945 ↓ 14.6 105,919 2

Parallel Seq Scan on material_requirements material_requirements_1 (cost=0.00..61,167.18 rows=7,267 width=97) (actual time=52.522..449.945 rows=105,919 loops=2)

  • Filter: ((NOT COALESCE(deleted, false)) AND ((COALESCE(type, ''::character varying))::text <> '2'::text) AND ((COALESCE(job_status, '?'::character varying))::text = ANY ('{A,O,IP,F,P}'::text[])) AND (CASE WHEN (((COALESCE(quantity_amount, '0'::double precision) >= '0'::double precision) AND ((COALESCE(quantity_amount, '0'::double precision) - COALESCE(used_quantity, '0'::double precision)) <= '0'::double precision)) OR ((COALESCE(quantity_amount, '0'::double precision) < '0'::double precision) AND ((COALESCE(quantity_amount, '0'::double precision) - COALESCE(used_quantity, '0'::double precision)) > '0'::double precision))) THEN '0'::double precision ELSE (COALESCE(quantity_amount, '0'::double precision) - COALESCE(used_quantity, '0'::double precision)) END <> '0'::double precision))
  • Rows Removed by Filter: 583908
22. 0.235 3.363 ↑ 1.4 667 2

Hash (cost=434.08..434.08 rows=914 width=11) (actual time=3.363..3.363 rows=667 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
23. 1.326 3.128 ↑ 1.4 667 2

HashAggregate (cost=415.80..424.94 rows=914 width=11) (actual time=2.407..3.128 rows=667 loops=2)

  • Group Key: transfer_orders_1.item_sid
24. 1.802 1.802 ↑ 1.0 1,127 2

Seq Scan on transfer_orders transfer_orders_1 (cost=0.00..412.98 rows=1,129 width=11) (actual time=0.035..1.802 rows=1,127 loops=2)

  • Filter: ((status)::text = 'O'::text)
  • Rows Removed by Filter: 2873
25. 0.000 0.000 ↓ 0.0 0 55,226

Index Scan using order_lines_pkey on order_lines order_lines_1 (cost=0.42..1.86 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=55,226)

  • Index Cond: (id = material_requirements_1.order_line_id)
26. 0.000 0.000 ↓ 0.0 0 55,226

Index Scan using purchase_orders_pkey on purchase_orders purchase_orders_1 (cost=0.29..0.51 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=55,226)

  • Index Cond: (order_lines_1.purchase_order_id = id)
27. 1.368 2.854 ↓ 1.0 3,538 2

Hash (cost=100.37..100.37 rows=3,537 width=21) (actual time=2.854..2.854 rows=3,538 loops=2)

  • Buckets: 4096 Batches: 1 Memory Usage: 219kB
28. 1.486 1.486 ↓ 1.0 3,538 2

Seq Scan on stores stores_1 (cost=0.00..100.37 rows=3,537 width=21) (actual time=0.027..1.486 rows=3,538 loops=2)

29. 1.572 247.759 ↓ 1.1 2,384 1

Subquery Scan on *SELECT* 3 (cost=590.08..2,093.81 rows=2,185 width=1,644) (actual time=61.339..247.759 rows=2,384 loops=1)

30. 4.422 246.187 ↓ 1.1 2,384 1

Hash Left Join (cost=590.08..2,066.50 rows=2,185 width=1,640) (actual time=61.334..246.187 rows=2,384 loops=1)

  • Hash Cond: ((sa.store_sid)::text = (stores_2.sid)::text)
31. 6.580 238.510 ↓ 1.1 2,384 1

Hash Join (cost=445.50..1,883.39 rows=2,185 width=42) (actual time=58.044..238.510 rows=2,384 loops=1)

  • Hash Cond: ((sa.item_sid)::text = (transfer_orders_2.item_sid)::text)
32. 229.250 229.250 ↑ 1.0 18,458 1

Seq Scan on stock_availabilities sa (cost=0.00..1,387.25 rows=19,283 width=42) (actual time=0.047..229.250 rows=18,458 loops=1)

  • Filter: (COALESCE(physical_amount, '0'::double precision) <> '0'::double precision)
  • Rows Removed by Filter: 930
33. 0.218 2.680 ↑ 1.4 667 1

Hash (cost=434.08..434.08 rows=914 width=11) (actual time=2.680..2.680 rows=667 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
34. 0.745 2.462 ↑ 1.4 667 1

HashAggregate (cost=415.80..424.94 rows=914 width=11) (actual time=2.277..2.462 rows=667 loops=1)

  • Group Key: transfer_orders_2.item_sid
35. 1.717 1.717 ↑ 1.0 1,127 1

Seq Scan on transfer_orders transfer_orders_2 (cost=0.00..412.98 rows=1,129 width=11) (actual time=0.010..1.717 rows=1,127 loops=1)

  • Filter: ((status)::text = 'O'::text)
  • Rows Removed by Filter: 2873
36. 1.496 3.255 ↓ 1.0 3,538 1

Hash (cost=100.37..100.37 rows=3,537 width=21) (actual time=3.254..3.255 rows=3,538 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 219kB
37. 1.759 1.759 ↓ 1.0 3,538 1

Seq Scan on stores stores_2 (cost=0.00..100.37 rows=3,537 width=21) (actual time=0.013..1.759 rows=3,538 loops=1)

38. 7.214 175.498 ↓ 26.1 8,194 1

Subquery Scan on *SELECT* 4 (cost=1,913.16..23,459.60 rows=314 width=2,698) (actual time=23.490..175.498 rows=8,194 loops=1)

39. 5.845 168.284 ↓ 26.1 8,194 1

Gather (cost=1,913.16..23,455.68 rows=314 width=2,694) (actual time=23.486..168.284 rows=8,194 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
40. 23.087 162.439 ↓ 20.8 2,731 3

Nested Loop Left Join (cost=913.16..22,424.28 rows=131 width=2,694) (actual time=19.280..162.439 rows=2,731 loops=3)

41. 3.401 139.348 ↓ 20.8 2,731 3

Hash Left Join (cost=912.88..22,352.29 rows=131 width=153) (actual time=19.207..139.348 rows=2,731 loops=3)

  • Hash Cond: (COALESCE(split_part((material_order_lines.production_place)::text, '.'::text, 1), ''::text) = (insp_prod_store.sid)::text)
42. 11.240 121.351 ↓ 20.8 2,731 3

Hash Join (cost=445.50..21,883.80 rows=131 width=81) (actual time=4.568..121.351 rows=2,731 loops=3)

  • Hash Cond: ((material_order_lines.item_sid)::text = (transfer_orders_3.item_sid)::text)
43. 105.700 105.700 ↓ 24.9 21,370 3

Parallel Seq Scan on material_order_lines (cost=0.00..21,436.04 rows=859 width=81) (actual time=0.041..105.700 rows=21,370 loops=3)

  • Filter: ((NOT COALESCE(deleted, false)) AND ((COALESCE(type, ''::character varying))::text <> 'E'::text) AND ((COALESCE(status, '?'::character varying))::text = ANY ('{A,O,IP,F,P}'::text[])) AND ((CASE WHEN (ordered_quantity >= 0) THEN CASE WHEN ((COALESCE(ordered_quantity, 0) - COALESCE(delivered_quantity, 0)) <= 0) THEN 0 ELSE (COALESCE(ordered_quantity, 0) - COALESCE(delivered_quantity, 0)) END ELSE CASE WHEN ((COALESCE(ordered_quantity, 0) - COALESCE(delivered_quantity, 0)) >= 0) THEN 0 ELSE (COALESCE(ordered_quantity, 0) - COALESCE(delivered_quantity, 0)) END END)::double precision <> '0'::double precision))
  • Rows Removed by Filter: 34175
44. 0.403 4.411 ↑ 1.4 667 3

Hash (cost=434.08..434.08 rows=914 width=11) (actual time=4.411..4.411 rows=667 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
45. 1.264 4.008 ↑ 1.4 667 3

HashAggregate (cost=415.80..424.94 rows=914 width=11) (actual time=3.686..4.008 rows=667 loops=3)

  • Group Key: transfer_orders_3.item_sid
46. 2.744 2.744 ↑ 1.0 1,127 3

Seq Scan on transfer_orders transfer_orders_3 (cost=0.00..412.98 rows=1,129 width=11) (actual time=0.034..2.744 rows=1,127 loops=3)

  • Filter: ((status)::text = 'O'::text)
  • Rows Removed by Filter: 2873
47. 0.083 14.596 ↑ 1.0 70 3

Hash (cost=466.51..466.51 rows=70 width=87) (actual time=14.596..14.596 rows=70 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
48. 1.520 14.513 ↑ 1.0 70 3

Hash Right Join (cost=352.17..466.51 rows=70 width=87) (actual time=12.796..14.513 rows=70 loops=3)

  • Hash Cond: ((production.sid)::text = insp_prod_store.production_store_sid)
49. 2.575 2.575 ↓ 1.0 3,538 3

Seq Scan on stores production (cost=0.00..100.37 rows=3,537 width=21) (actual time=0.008..2.575 rows=3,538 loops=3)

50. 0.062 10.418 ↑ 1.0 70 3

Hash (cost=351.30..351.30 rows=70 width=80) (actual time=10.417..10.418 rows=70 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
51. 1.427 10.356 ↑ 1.0 70 3

Hash Right Join (cost=236.97..351.30 rows=70 width=80) (actual time=8.708..10.356 rows=70 loops=3)

  • Hash Cond: ((inspection.sid)::text = insp_prod_store.inspection_store_sid)
52. 2.553 2.553 ↓ 1.0 3,538 3

Seq Scan on stores inspection (cost=0.00..100.37 rows=3,537 width=21) (actual time=0.010..2.553 rows=3,538 loops=3)

53. 0.052 6.376 ↑ 1.0 70 3

Hash (cost=236.09..236.09 rows=70 width=73) (actual time=6.376..6.376 rows=70 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
54. 0.051 6.324 ↑ 1.0 70 3

Subquery Scan on insp_prod_store (cost=234.69..236.09 rows=70 width=73) (actual time=6.226..6.324 rows=70 loops=3)

55. 0.162 6.273 ↑ 1.0 70 3

HashAggregate (cost=234.69..235.39 rows=70 width=73) (actual time=6.224..6.273 rows=70 loops=3)

  • Group Key: pp.sid
56. 0.148 6.111 ↑ 1.0 73 3

Hash Right Join (cost=118.45..234.14 rows=73 width=37) (actual time=4.915..6.111 rows=73 loops=3)

  • Hash Cond: (insprod.id = pp.workshop_id)
57. 1.271 5.826 ↑ 1.0 26 3

Hash Right Join (cost=115.80..229.70 rows=26 width=36) (actual time=4.677..5.826 rows=26 loops=3)

  • Hash Cond: (production_1.id = insprod.inspection_store_id)
58. 1.558 1.558 ↓ 1.0 3,538 3

Seq Scan on stores production_1 (cost=0.00..100.37 rows=3,537 width=22) (actual time=0.007..1.558 rows=3,538 loops=3)

59. 0.034 2.997 ↑ 1.0 26 3

Hash (cost=115.48..115.48 rows=26 width=30) (actual time=2.997..2.997 rows=26 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
60. 1.189 2.963 ↑ 1.0 26 3

Hash Right Join (cost=1.58..115.48 rows=26 width=30) (actual time=1.779..2.963 rows=26 loops=3)

  • Hash Cond: (inspection_1.id = insprod.inspection_store_id)
61. 1.701 1.701 ↓ 1.0 3,538 3

Seq Scan on stores inspection_1 (cost=0.00..100.37 rows=3,537 width=22) (actual time=0.016..1.701 rows=3,538 loops=3)

62. 0.024 0.073 ↑ 1.0 26 3

Hash (cost=1.26..1.26 rows=26 width=16) (actual time=0.073..0.073 rows=26 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
63. 0.049 0.049 ↑ 1.0 26 3

Seq Scan on workshops insprod (cost=0.00..1.26 rows=26 width=16) (actual time=0.033..0.049 rows=26 loops=3)

64. 0.048 0.137 ↑ 1.0 73 3

Hash (cost=1.73..1.73 rows=73 width=17) (actual time=0.137..0.137 rows=73 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
65. 0.089 0.089 ↑ 1.0 73 3

Seq Scan on production_places pp (cost=0.00..1.73 rows=73 width=17) (actual time=0.056..0.089 rows=73 loops=3)

66. 0.004 0.004 ↑ 1.0 1 8,194

Index Scan using pk_store_id on stores standardstore (cost=0.28..0.45 rows=1 width=15) (actual time=0.004..0.004 rows=1 loops=8,194)

  • Index Cond: (id = material_order_lines.target_store_id)
67. 7.771 190.115 ↓ 12.5 7,862 1

Subquery Scan on *SELECT* 5 (cost=1,445.78..22,894.61 rows=631 width=2,784) (actual time=6.393..190.115 rows=7,862 loops=1)

68. 1.687 182.344 ↓ 12.5 7,862 1

Gather (cost=1,445.78..22,886.72 rows=631 width=2,780) (actual time=6.388..182.344 rows=7,862 loops=1)

  • Workers Planned: 2
  • Workers Launched: 1
69. 68.156 180.657 ↓ 14.9 3,931 2

Nested Loop Left Join (cost=445.78..21,823.62 rows=263 width=2,780) (actual time=4.263..180.657 rows=3,931 loops=2)

70. 15.225 112.487 ↓ 14.9 3,931 2

Hash Join (cost=445.50..21,712.50 rows=263 width=73) (actual time=4.187..112.487 rows=3,931 loops=2)

  • Hash Cond: ((material_order_lines_1.item_sid)::text = (transfer_orders_4.item_sid)::text)
71. 93.203 93.203 ↓ 18.1 31,191 2

Parallel Seq Scan on material_order_lines material_order_lines_1 (cost=0.00..21,262.46 rows=1,727 width=73) (actual time=0.033..93.203 rows=31,191 loops=2)

  • Filter: (((COALESCE(status, '?'::character varying))::text = ANY ('{A,O,OC,P,Q}'::text[])) AND ((CASE WHEN (((COALESCE(ordered_quantity, 0) >= 0) AND ((COALESCE(ordered_quantity, 0) - COALESCE(delivered_quantity, 0)) <= 0)) OR ((COALESCE(ordered_quantity, 0) < 0) AND ((COALESCE(ordered_quantity, 0) - COALESCE(delivered_quantity, 0)) > 0))) THEN 0 ELSE (COALESCE(ordered_quantity, 0) - COALESCE(delivered_quantity, 0)) END)::double precision <> '0'::double precision))
  • Rows Removed by Filter: 52126
72. 0.352 4.059 ↑ 1.4 667 2

Hash (cost=434.08..434.08 rows=914 width=11) (actual time=4.059..4.059 rows=667 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
73. 1.131 3.707 ↑ 1.4 667 2

HashAggregate (cost=415.80..424.94 rows=914 width=11) (actual time=3.406..3.707 rows=667 loops=2)

  • Group Key: transfer_orders_4.item_sid
74. 2.576 2.576 ↑ 1.0 1,127 2

Seq Scan on transfer_orders transfer_orders_4 (cost=0.00..412.98 rows=1,129 width=11) (actual time=0.025..2.576 rows=1,127 loops=2)

  • Filter: ((status)::text = 'O'::text)
  • Rows Removed by Filter: 2873
75. 0.014 0.014 ↑ 1.0 1 7,862

Index Scan using uq_stores_sid on stores stores_3 (cost=0.28..0.39 rows=1 width=21) (actual time=0.014..0.014 rows=1 loops=7,862)

  • Index Cond: ((sid)::text = (material_order_lines_1.target_store_sid)::text)
76. 2.765 10.689 ↓ 102.5 1,127 1

Nested Loop Left Join (cost=0.28..512.35 rows=11 width=2,271) (actual time=0.069..10.689 rows=1,127 loops=1)

77. 3.416 3.416 ↓ 102.5 1,127 1

Seq Scan on transfer_orders transfer_orders_5 (cost=0.00..432.97 rows=11 width=600) (actual time=0.023..3.416 rows=1,127 loops=1)

  • Filter: (((COALESCE(status, '?'::character varying))::text = ANY ('{O,IP}'::text[])) AND (COALESCE(quantity, '0'::double precision) <> '0'::double precision) AND ((status)::text = 'O'::text))
  • Rows Removed by Filter: 2873
78. 4.508 4.508 ↑ 1.0 1 1,127

Index Scan using pk_store_id on stores stores_4 (cost=0.28..7.21 rows=1 width=15) (actual time=0.004..0.004 rows=1 loops=1,127)

  • Index Cond: (id = transfer_orders_5.from_store_id)
79. 2.235 10.064 ↓ 102.5 1,127 1

Nested Loop Left Join (cost=0.28..512.30 rows=11 width=2,271) (actual time=0.069..10.064 rows=1,127 loops=1)

80. 3.321 3.321 ↓ 102.5 1,127 1

Seq Scan on transfer_orders transfer_orders_6 (cost=0.00..432.97 rows=11 width=597) (actual time=0.033..3.321 rows=1,127 loops=1)

  • Filter: (((COALESCE(status, '?'::character varying))::text = ANY ('{O,IP}'::text[])) AND (COALESCE(quantity, '0'::double precision) <> '0'::double precision) AND ((status)::text = 'O'::text))
  • Rows Removed by Filter: 2873
81. 4.508 4.508 ↑ 1.0 1 1,127

Index Scan using pk_store_id on stores stores_5 (cost=0.28..7.21 rows=1 width=15) (actual time=0.004..0.004 rows=1 loops=1,127)

  • Index Cond: (id = transfer_orders_6.to_store_id)