explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jYrq

Settings
# exclusive inclusive rows x rows loops node
1. 1.391 1,473.533 ↑ 676,171.1 836 1

Sort (cost=324,526,806.65..324,809,446.17 rows=565,279,044 width=826) (actual time=1,473.478..1,473.533 rows=836 loops=1)

  • Sort Key: _op.reference_number
  • Sort Method: quicksort Memory: 458kB
2.          

CTE _offers

3. 0.002 0.638 ↑ 1.0 5 1

Limit (cost=0.06..5.65 rows=5 width=16) (actual time=0.149..0.638 rows=5 loops=1)

4. 0.593 0.636 ↑ 159.2 5 1

Nested Loop (cost=0.06..890.96 rows=796 width=16) (actual time=0.148..0.636 rows=5 loops=1)

5. 0.023 0.023 ↑ 159.2 5 1

Seq Scan on offers o (cost=0.00..777.69 rows=796 width=656) (actual time=0.011..0.023 rows=5 loops=1)

  • Filter: ((created_at > '2019-11-01 00:00:00-04'::timestamp with time zone) AND (offer_type = ANY ('{business_plan.premier,business_plan.preferred,business_plan.premier.historical,business_plan.preferred.historical}'::text[])))
  • Rows Removed by Filter: 8
6. 0.020 0.020 ↑ 1.0 1 5

Index Only Scan using users_pkey on users u (cost=0.06..0.14 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=5)

  • Index Cond: (id = (((o.properties -> 'owner'::text) ->> 'id'::text))::uuid)
  • Heap Fetches: 1
7.          

CTE _offers_plus

8. 5.097 92.997 ↓ 1.7 836 1

HashAggregate (cost=35.34..40.34 rows=500 width=1,034) (actual time=91.577..92.997 rows=836 loops=1)

  • Group Key: o_1.id, ((obj.offer_item ->> 'product_id'::text))::uuid, (((o_1.properties -> 'owner'::text) ->> 'id'::text))::uuid
9. 86.330 87.900 ↓ 1.7 836 1

Nested Loop (cost=0.06..25.09 rows=500 width=842) (actual time=0.441..87.900 rows=836 loops=1)

10. 0.010 0.680 ↑ 1.0 5 1

Nested Loop (cost=0.06..20.34 rows=5 width=778) (actual time=0.159..0.680 rows=5 loops=1)

11. 0.645 0.645 ↑ 1.0 5 1

CTE Scan on _offers _o (cost=0.00..0.03 rows=5 width=16) (actual time=0.151..0.645 rows=5 loops=1)

12. 0.025 0.025 ↑ 1.0 1 5

Index Scan using offers_pk on offers o_1 (cost=0.06..4.06 rows=1 width=778) (actual time=0.005..0.005 rows=1 loops=5)

  • Index Cond: (id = _o.id)
13. 0.890 0.890 ↓ 1.7 167 5

Function Scan on jsonb_array_elements obj (cost=0.00..0.30 rows=100 width=32) (actual time=0.153..0.178 rows=167 loops=5)

14.          

CTE _prod_to_sku

15. 20.951 134.121 ↑ 141.0 2,963 1

Merge Join (cost=10,411.36..12,923.10 rows=417,635 width=96) (actual time=108.878..134.121 rows=2,963 loops=1)

  • Merge Cond: (((p.query_properties ->> 'material_id'::text)) = ((s_1.query_external_identifiers ->> 'material_id'::text)))
16. 5.675 7.699 ↑ 1.0 2,963 1

Sort (cost=771.06..772.54 rows=2,963 width=431) (actual time=7.332..7.699 rows=2,963 loops=1)

  • Sort Key: ((p.query_properties ->> 'material_id'::text))
  • Sort Method: quicksort Memory: 1,713kB
17. 2.024 2.024 ↑ 1.0 2,963 1

Seq Scan on products p (cost=0.00..736.89 rows=2,963 width=431) (actual time=0.015..2.024 rows=2,963 loops=1)

18. 85.901 105.471 ↑ 1.0 28,190 1

Sort (cost=9,640.30..9,654.39 rows=28,190 width=702) (actual time=101.534..105.471 rows=28,190 loops=1)

  • Sort Key: ((s_1.query_external_identifiers ->> 'material_id'::text))
  • Sort Method: quicksort Memory: 29,422kB
19. 19.570 19.570 ↓ 1.0 28,192 1

Seq Scan on skus s_1 (cost=0.00..9,223.57 rows=28,190 width=702) (actual time=0.007..19.570 rows=28,192 loops=1)

20.          

CTE _customer_context

21. 12.791 34.233 ↑ 49.6 5 1

Unique (cost=1,961.47..1,964.57 rows=248 width=1,254) (actual time=21.374..34.233 rows=5 loops=1)

22. 19.219 21.442 ↓ 3.4 836 1

Sort (cost=1,961.47..1,961.60 rows=248 width=1,254) (actual time=21.372..21.442 rows=836 loops=1)

  • Sort Key: customer_context_versions_2.customer_context_id, customer_context_versions_2.version, customer_context_versions_2.id, customer_context_versions_2.customer_id, customer_context_versions_2.customer_label, customer_context_versions_2.customer_city, customer_context_versions_2.customer_state_province, customer_context_versions_2.channel_partner_id, customer_context_versions_2.customer_hierarchy_type, customer_context_versions_2.customer_hierarchy_level, customer_context_versions_2.channel_role, customer_context_versions_2.customer_children, customer_context_versions_2.descendant_customer_ids, customer_context_versions_2.customer_parent, customer_context_versions_2.ancestor_customer_ids, customer_context_versions_2.pay_to_customer_id, customer_context_versions_2.bagged_properties, customer_context_versions_2.query_properties, customer_context_versions_2.read_authorization, customer_context_versions_2.created_at, customer_context_versions_2.created_by, customer_context_versions_2.creator_impersonated_by, customer_context_versions_2.active_period, o_2.offer_id
  • Sort Method: quicksort Memory: 1,545kB
23. 0.444 2.223 ↓ 3.4 836 1

Nested Loop (cost=0.08..1,959.50 rows=248 width=1,254) (actual time=0.010..2.223 rows=836 loops=1)

24. 0.107 0.107 ↓ 1.7 836 1

CTE Scan on _offers_plus o_2 (cost=0.00..3.00 rows=500 width=32) (actual time=0.000..0.107 rows=836 loops=1)

25. 1.672 1.672 ↑ 1.0 1 836

Index Scan using customer_context_versions_ukey2 on customer_context_versions customer_context_versions_2 (cost=0.08..3.91 rows=1 width=1,238) (actual time=0.002..0.002 rows=1 loops=836)

  • Index Cond: (customer_context_id = o_2.earner_id)
26.          

CTE _customers

27. 0.140 34.400 ↑ 834.9 30 1

HashAggregate (cost=178.44..253.58 rows=25,048 width=32) (actual time=34.280..34.400 rows=30 loops=1)

  • Group Key: (unnest(_customer_context.descendant_customer_ids)), _customer_context.offer_id
28. 0.005 34.260 ↑ 715.7 35 1

Append (cost=0.00..153.39 rows=25,048 width=32) (actual time=21.382..34.260 rows=35 loops=1)

29. 0.014 34.252 ↑ 826.7 30 1

ProjectSet (cost=0.00..39.18 rows=24,800 width=32) (actual time=21.381..34.252 rows=30 loops=1)

30. 34.238 34.238 ↑ 49.6 5 1

CTE Scan on _customer_context (cost=0.00..1.49 rows=248 width=48) (actual time=21.376..34.238 rows=5 loops=1)

31. 0.003 0.003 ↑ 49.6 5 1

CTE Scan on _customer_context _customer_context_1 (cost=0.00..1.49 rows=248 width=32) (actual time=0.001..0.003 rows=5 loops=1)

32.          

CTE _summary

33. 0.001 273.194 ↓ 0.0 0 1

GroupAggregate (cost=3,853,602.70..4,313,803.70 rows=53,870,589 width=124) (actual time=273.194..273.194 rows=0 loops=1)

  • Group Key: c.customer_id, csal.market_year, pts_1.product_id, csal.sku_id, pts_1.bs_name
  • Filter: (sum(csal.quantity_sold) <> '0'::numeric)
34. 0.006 273.193 ↓ 0.0 0 1

Sort (cost=3,853,602.70..3,880,673.34 rows=54,141,295 width=97) (actual time=273.193..273.193 rows=0 loops=1)

  • Sort Key: c.customer_id, csal.market_year, pts_1.product_id, csal.sku_id, pts_1.bs_name
  • Sort Method: quicksort Memory: 25kB
35. 0.001 273.187 ↓ 0.0 0 1

Hash Left Join (cost=48,129.83..347,805.59 rows=54,141,295 width=97) (actual time=273.187..273.187 rows=0 loops=1)

  • Hash Cond: ((pts_1.bs_code = (bsmy.business_segment).code) AND (csal.market_year = bsmy.market_year))
36. 0.001 273.186 ↓ 0.0 0 1

Merge Left Join (cost=48,126.39..265,021.24 rows=54,141,295 width=129) (actual time=273.186..273.186 rows=0 loops=1)

  • Merge Cond: (csal.sku_id = pts_1.sku_id)
37. 0.004 273.185 ↓ 0.0 0 1

Sort (cost=37,822.54..37,987.38 rows=329,669 width=49) (actual time=273.185..273.185 rows=0 loops=1)

  • Sort Key: csal.sku_id
  • Sort Method: quicksort Memory: 25kB
38. 14.928 273.181 ↓ 0.0 0 1

Merge Join (cost=30,435.77..31,779.50 rows=329,669 width=49) (actual time=273.181..273.181 rows=0 loops=1)

  • Merge Cond: (c.customer_id = csal.customer_id)
39. 0.016 34.427 ↑ 834.9 30 1

Sort (cost=516.30..528.82 rows=25,048 width=16) (actual time=34.422..34.427 rows=30 loops=1)

  • Sort Key: c.customer_id
  • Sort Method: quicksort Memory: 26kB
40. 34.411 34.411 ↑ 834.9 30 1

CTE Scan on _customers c (cost=0.00..150.29 rows=25,048 width=16) (actual time=34.282..34.411 rows=30 loops=1)

41. 53.251 223.826 ↑ 1.0 168,988 1

Sort (cost=29,919.47..30,004.10 rows=169,257 width=49) (actual time=215.727..223.826 rows=168,988 loops=1)

  • Sort Key: csal.customer_id
  • Sort Method: quicksort Memory: 30,416kB
42. 170.575 170.575 ↓ 1.0 172,598 1

Seq Scan on customer_sales csal (cost=0.00..26,979.67 rows=169,257 width=49) (actual time=0.047..170.575 rows=172,598 loops=1)

  • Filter: (source = 'distributor_retail_sales'::text)
  • Rows Removed by Filter: 1,363,308
43. 0.000 0.000 ↓ 0.0 0

Sort (cost=10,303.84..10,512.66 rows=417,635 width=96) (never executed)

  • Sort Key: pts_1.sku_id
44. 0.000 0.000 ↓ 0.0 0

CTE Scan on _prod_to_sku pts_1 (cost=0.00..2,505.81 rows=417,635 width=96) (never executed)

45. 0.000 0.000 ↓ 0.0 0

Hash (cost=3.39..3.39 rows=14 width=77) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Seq Scan on business_segment_market_years bsmy (cost=0.00..3.39 rows=14 width=77) (never executed)

  • Filter: (period @> CURRENT_DATE)
47.          

CTE _hierarchy

48. 0.347 504.071 ↑ 30.0 4 1

GroupAggregate (cost=2,398.17..2,398.77 rows=120 width=48) (actual time=503.776..504.071 rows=4 loops=1)

  • Group Key: _op_1.owner_id
49. 0.374 503.724 ↓ 7.0 836 1

Sort (cost=2,398.17..2,398.23 rows=120 width=48) (actual time=503.678..503.724 rows=836 loops=1)

  • Sort Key: _op_1.owner_id
  • Sort Method: quicksort Memory: 90kB
50. 469.825 503.350 ↓ 7.0 836 1

Nested Loop (cost=1,428.30..2,397.34 rows=120 width=48) (actual time=10.093..503.350 rows=836 loops=1)

  • Join Filter: ((lower((u_1.query_properties ->> 'sam_account_name'::text)) = lower(h_1.l2_manager_sam_id)) OR (lower((u_1.query_properties ->> 'sam_account_name'::text)) = lower(h_1.l3_manager_sam_id)))
  • Rows Removed by Join Filter: 358,644
51. 0.266 4.265 ↓ 1.7 836 1

Nested Loop (cost=0.06..879.00 rows=500 width=292) (actual time=0.010..4.265 rows=836 loops=1)

52. 2.327 2.327 ↓ 1.7 836 1

CTE Scan on _offers_plus _op_1 (cost=0.00..3.00 rows=500 width=16) (actual time=0.000..2.327 rows=836 loops=1)

53. 1.672 1.672 ↑ 1.0 1 836

Index Scan using users_pkey on users u_1 (cost=0.06..1.75 rows=1 width=292) (actual time=0.002..0.002 rows=1 loops=836)

  • Index Cond: (id = _op_1.owner_id)
54. 19.810 29.260 ↓ 17.9 430 836

Materialize (cost=1,428.24..1,428.35 rows=24 width=96) (actual time=0.011..0.035 rows=430 loops=836)

55. 0.087 9.450 ↓ 17.9 430 1

Subquery Scan on h_1 (cost=1,428.24..1,428.32 rows=24 width=96) (actual time=9.342..9.450 rows=430 loops=1)

56. 3.119 9.363 ↓ 17.9 430 1

Sort (cost=1,428.24..1,428.25 rows=24 width=1,200) (actual time=9.341..9.363 rows=430 loops=1)

  • Sort Key: _data_3._lineage
  • Sort Method: quicksort Memory: 138kB
57.          

CTE _traverse

58. 0.093 1.003 ↑ 9.6 492 1

Recursive Union (cost=0.00..1,076.01 rows=4,706 width=52) (actual time=0.012..1.003 rows=492 loops=1)

59. 0.090 0.090 ↑ 1.0 6 1

Seq Scan on zones (cost=0.00..92.48 rows=6 width=50) (actual time=0.011..0.090 rows=6 loops=1)

  • Filter: (parent_id IS NULL)
  • Rows Removed by Filter: 486
60. 0.344 0.820 ↑ 3.9 122 4

Hash Join (cost=0.57..95.53 rows=470 width=52) (actual time=0.077..0.205 rows=122 loops=4)

  • Hash Cond: (h.parent_id = t.id)
61. 0.320 0.320 ↑ 1.0 492 4

Seq Scan on zones h (cost=0.00..92.48 rows=492 width=62) (actual time=0.002..0.080 rows=492 loops=4)

62. 0.096 0.156 ↓ 2.0 123 4

Hash (cost=0.36..0.36 rows=60 width=52) (actual time=0.038..0.039 rows=123 loops=4)

  • Buckets: 1,024 Batches: 1 Memory Usage: 69kB
63. 0.060 0.060 ↓ 2.0 123 4

WorkTable Scan on _traverse t (cost=0.00..0.36 rows=60 width=52) (actual time=0.001..0.015 rows=123 loops=4)

64.          

CTE _sorted

65. 3.249 4.963 ↑ 9.6 492 1

Sort (cost=182.35..184.70 rows=4,706 width=605) (actual time=4.934..4.963 rows=492 loops=1)

  • Sort Key: t_1._lineage
  • Sort Method: quicksort Memory: 503kB
66. 0.237 1.714 ↑ 9.6 492 1

Hash Join (cost=94.20..124.94 rows=4,706 width=605) (actual time=0.333..1.714 rows=492 loops=1)

  • Hash Cond: (t_1.id = z.id)
67. 1.168 1.168 ↑ 9.6 492 1

CTE Scan on _traverse t_1 (cost=0.00..28.24 rows=4,706 width=52) (actual time=0.013..1.168 rows=492 loops=1)

68. 0.148 0.309 ↑ 1.0 492 1

Hash (cost=92.48..92.48 rows=492 width=569) (actual time=0.309..0.309 rows=492 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 270kB
69. 0.161 0.161 ↑ 1.0 492 1

Seq Scan on zones z (cost=0.00..92.48 rows=492 width=569) (actual time=0.002..0.161 rows=492 loops=1)

70.          

CTE _data

71. 5.474 5.474 ↑ 9.6 492 1

CTE Scan on _sorted (cost=0.00..44.71 rows=4,706 width=356) (actual time=4.943..5.474 rows=492 loops=1)

72. 0.125 6.244 ↓ 17.9 430 1

Hash Left Join (cost=92.02..122.71 rows=24 width=1,200) (actual time=6.050..6.244 rows=430 loops=1)

  • Hash Cond: (_data_2.id = _data_3.parent_id)
73. 0.015 5.935 ↓ 1.8 42 1

Hash Left Join (cost=61.35..92.00 rows=24 width=80) (actual time=5.858..5.935 rows=42 loops=1)

  • Hash Cond: (_data_1.id = _data_2.parent_id)
74. 0.013 5.845 ↑ 1.0 24 1

Hash Left Join (cost=30.67..61.30 rows=24 width=16) (actual time=5.778..5.845 rows=24 loops=1)

  • Hash Cond: (_data.id = _data_1.parent_id)
75. 5.008 5.008 ↑ 4.0 6 1

CTE Scan on _data (cost=0.00..30.59 rows=24 width=16) (actual time=4.946..5.008 rows=6 loops=1)

  • Filter: (_level = 0)
  • Rows Removed by Filter: 486
76. 0.006 0.824 ↑ 1.0 24 1

Hash (cost=30.59..30.59 rows=24 width=32) (actual time=0.824..0.824 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
77. 0.818 0.818 ↑ 1.0 24 1

CTE Scan on _data _data_1 (cost=0.00..30.59 rows=24 width=32) (actual time=0.005..0.818 rows=24 loops=1)

  • Filter: (_level = 1)
  • Rows Removed by Filter: 468
78. 0.010 0.075 ↓ 1.5 37 1

Hash (cost=30.59..30.59 rows=24 width=96) (actual time=0.074..0.075 rows=37 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
79. 0.065 0.065 ↓ 1.5 37 1

CTE Scan on _data _data_2 (cost=0.00..30.59 rows=24 width=96) (actual time=0.002..0.065 rows=37 loops=1)

  • Filter: (_level = 2)
  • Rows Removed by Filter: 455
80. 0.079 0.184 ↓ 17.7 425 1

Hash (cost=30.59..30.59 rows=24 width=80) (actual time=0.184..0.184 rows=425 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 70kB
81. 0.105 0.105 ↓ 17.7 425 1

CTE Scan on _data _data_3 (cost=0.00..30.59 rows=24 width=80) (actual time=0.003..0.105 rows=425 loops=1)

  • Filter: (_level = 3)
  • Rows Removed by Filter: 67
82. 449.447 1,472.142 ↑ 676,171.1 836 1

Merge Left Join (cost=509,875.90..8,424,054.70 rows=565,279,044 width=826) (actual time=1,022.626..1,472.142 rows=836 loops=1)

  • Merge Cond: (_op.product_id = pts.product_id)
83. 1.151 885.707 ↑ 323.8 836 1

Sort (cost=499,572.06..499,707.41 rows=270,705 width=1,548) (actual time=885.520..885.707 rows=836 loops=1)

  • Sort Key: _op.product_id
  • Sort Method: quicksort Memory: 2,040kB
84. 0.417 884.556 ↑ 323.8 836 1

Hash Right Join (cost=54.78..364,489.32 rows=270,705 width=1,548) (actual time=884.149..884.556 rows=836 loops=1)

  • Hash Cond: (s.product_id = _op.product_id)
85. 273.196 273.196 ↓ 0.0 0 1

CTE Scan on _summary s (cost=0.00..323,223.53 rows=53,870,589 width=48) (actual time=273.196..273.196 rows=0 loops=1)

86. 0.826 610.943 ↓ 836.0 836 1

Hash (cost=54.78..54.78 rows=1 width=1,516) (actual time=610.943..610.943 rows=836 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1,576kB
87. 1.255 610.117 ↓ 836.0 836 1

Nested Loop (cost=33.62..54.78 rows=1 width=1,516) (actual time=595.669..610.117 rows=836 loops=1)

88. 1.058 606.354 ↓ 836.0 836 1

Nested Loop Left Join (cost=16.89..34.05 rows=1 width=1,014) (actual time=595.637..606.354 rows=836 loops=1)

  • Join Filter: (_op.owner_id = _hier.owner_id)
  • Rows Removed by Join Filter: 2,508
89. 1.561 101.188 ↓ 836.0 836 1

Nested Loop (cost=16.89..32.91 rows=1 width=998) (actual time=91.636..101.188 rows=836 loops=1)

90. 0.162 96.283 ↓ 836.0 836 1

Nested Loop Left Join (cost=0.17..12.18 rows=1 width=496) (actual time=91.608..96.283 rows=836 loops=1)

91. 0.711 94.449 ↓ 836.0 836 1

Nested Loop Left Join (cost=0.08..8.09 rows=1 width=480) (actual time=91.598..94.449 rows=836 loops=1)

92. 92.066 92.066 ↓ 836.0 836 1

CTE Scan on _offers_plus _op (cost=0.00..4.00 rows=1 width=464) (actual time=91.583..92.066 rows=836 loops=1)

  • Filter: (((earner_type = 'CustomerContext'::text) OR (earner_type = 'Customer'::text)) AND ((payee_type = 'CustomerContext'::text) OR (payee_type = 'Customer'::text)))
93. 1.672 1.672 ↑ 1.0 1 836

Index Scan using customer_context_versions_ukey2 on customer_context_versions (cost=0.08..4.09 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=836)

  • Index Cond: (customer_context_id = _op.earner_id)
94. 1.672 1.672 ↓ 0.0 0 836

Index Scan using customer_context_versions_ukey2 on customer_context_versions customer_context_versions_1 (cost=0.08..4.09 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=836)

  • Index Cond: (customer_context_id = _op.payee_id)
95. 0.000 3.344 ↑ 1.0 1 836

Bitmap Heap Scan on customers ce (cost=16.73..20.73 rows=1 width=582) (actual time=0.004..0.004 rows=1 loops=836)

  • Recheck Cond: ((id = customer_context_versions.customer_id) OR (id = _op.earner_id))
  • Filter: (((_op.earner_type = 'CustomerContext'::text) AND (id = customer_context_versions.customer_id)) OR ((_op.earner_type = 'Customer'::text) AND (id = _op.earner_id)))
  • Heap Blocks: exact=836
96. 0.000 3.344 ↓ 0.0 0 836

BitmapOr (cost=16.73..16.73 rows=2 width=0) (actual time=0.004..0.004 rows=0 loops=836)

97. 1.672 1.672 ↑ 1.0 1 836

Bitmap Index Scan on customers_pkey (cost=0.00..0.10 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=836)

  • Index Cond: (id = customer_context_versions.customer_id)
98. 1.672 1.672 ↓ 0.0 0 836

Bitmap Index Scan on customers_pkey (cost=0.00..2.09 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=836)

  • Index Cond: (id = _op.earner_id)
99. 504.108 504.108 ↑ 30.0 4 836

CTE Scan on _hierarchy _hier (cost=0.00..0.72 rows=120 width=48) (actual time=0.603..0.603 rows=4 loops=836)

100. 0.836 2.508 ↑ 1.0 1 836

Bitmap Heap Scan on customers cp (cost=16.73..20.73 rows=1 width=582) (actual time=0.003..0.003 rows=1 loops=836)

  • Recheck Cond: ((id = customer_context_versions_1.pay_to_customer_id) OR (id = _op.payee_id))
  • Filter: (((_op.payee_type = 'CustomerContext'::text) AND (id = customer_context_versions_1.pay_to_customer_id)) OR ((_op.payee_type = 'Customer'::text) AND (id = _op.payee_id)))
  • Heap Blocks: exact=836
101. 0.000 1.672 ↓ 0.0 0 836

BitmapOr (cost=16.73..16.73 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=836)

102. 0.000 0.000 ↓ 0.0 0 836

Bitmap Index Scan on customers_pkey (cost=0.00..0.10 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=836)

  • Index Cond: (id = customer_context_versions_1.pay_to_customer_id)
103. 1.672 1.672 ↑ 1.0 1 836

Bitmap Index Scan on customers_pkey (cost=0.00..2.09 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=836)

  • Index Cond: (id = _op.payee_id)
104. 1.610 136.988 ↑ 115.8 3,605 1

Sort (cost=10,303.84..10,512.66 rows=417,635 width=48) (actual time=136.497..136.988 rows=3,605 loops=1)

  • Sort Key: pts.product_id
  • Sort Method: quicksort Memory: 328kB
105. 135.378 135.378 ↑ 141.0 2,963 1

CTE Scan on _prod_to_sku pts (cost=0.00..2,505.81 rows=417,635 width=48) (actual time=108.883..135.378 rows=2,963 loops=1)

Planning time : 4.596 ms
Execution time : 1,474.578 ms