explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ryb7

Settings
# exclusive inclusive rows x rows loops node
1. 0.057 2,952.450 ↑ 878.1 13 1

GroupAggregate (cost=1,335,524.47..1,339,371.77 rows=11,415 width=572) (actual time=2,952.428..2,952.450 rows=13 loops=1)

  • Group Key: t.user_bo_id, (CASE WHEN (p.shop_id > 100) THEN s.id ELSE 1 END), (date(t.date_end)), (sum(CASE WHEN ((store.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((box.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((e.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((inst.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((m2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((m3.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((m4.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((bhl.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((top2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((zz.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((pik1.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((pik2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((mez.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((g_1.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((gold.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((shelf.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((yv1.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((yv2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((yv3.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((shoes.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((mez3.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((mez4.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (count(box.id)), (count(e.id)), (count(inst.id)), (count(m2.id)), (count(m3.id)), (count(m4.id)), (count(bhl.id)), (count(top2.id)), (count(zz.id)), (count(pik1.id)), (count(pik2.id)), (count(mez.id)), (count(g_1.id)), (count(gold.id)), (count(shelf.id)), (count(yv1.id)), (count(yv2.id)), (count(yv3.id)), (count(shoes.id)), (count(mez3.id)), (count(mez4.id)), (count(store.id)), (count(DISTINCT box.id)), (count(DISTINCT e.id)), (count(DISTINCT inst.id)), (count(DISTINCT m2.id)), (count(DISTINCT m3.id)), (count(DISTINCT m4.id)), (count(DISTINCT bhl.id)), (count(DISTINCT top2.id)), (count(DISTINCT zz.id)), (count(DISTINCT pik1.id)), (count(DISTINCT pik2.id)), (count(DISTINCT mez.id)), (count(DISTINCT g_1.id)), (count(DISTINCT gold.id)), (count(DISTINCT shelf.id)), (count(DISTINCT yv1.id)), (count(DISTINCT yv2.id)), (count(DISTINCT yv3.id)), (count(DISTINCT shoes.id)), (count(DISTINCT mez3.id)), (count(DISTINCT mez4.id)), (count(DISTINCT store.id))
2. 0.036 2,952.393 ↑ 1,489.3 13 1

Sort (cost=1,335,524.47..1,335,572.88 rows=19,361 width=554) (actual time=2,952.392..2,952.393 rows=13 loops=1)

  • Sort Key: t.user_bo_id, (CASE WHEN (p.shop_id > 100) THEN s.id ELSE 1 END), (date(t.date_end)), (sum(CASE WHEN ((store.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((box.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((e.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((inst.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((m2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((m3.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((m4.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((bhl.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((top2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((zz.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((pik1.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((pik2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((mez.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((g_1.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((gold.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((shelf.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((yv1.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((yv2.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((yv3.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((shoes.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((mez3.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (sum(CASE WHEN ((mez4.id IS NOT NULL) AND (fl.flag_id IS NULL)) THEN t.cnt ELSE 0 END)), (count(box.id)), (count(e.id)), (count(inst.id)), (count(m2.id)), (count(m3.id)), (count(m4.id)), (count(bhl.id)), (count(top2.id)), (count(zz.id)), (count(pik1.id)), (count(pik2.id)), (count(mez.id)), (count(g_1.id)), (count(gold.id)), (count(shelf.id)), (count(yv1.id)), (count(yv2.id)), (count(yv3.id)), (count(shoes.id)), (count(mez3.id)), (count(mez4.id)), (count(store.id)), (count(DISTINCT box.id)), (count(DISTINCT e.id)), (count(DISTINCT inst.id)), (count(DISTINCT m2.id)), (count(DISTINCT m3.id)), (count(DISTINCT m4.id)), (count(DISTINCT bhl.id)), (count(DISTINCT top2.id)), (count(DISTINCT zz.id)), (count(DISTINCT pik1.id)), (count(DISTINCT pik2.id)), (count(DISTINCT mez.id)), (count(DISTINCT g_1.id)), (count(DISTINCT gold.id)), (count(DISTINCT shelf.id)), (count(DISTINCT yv1.id)), (count(DISTINCT yv2.id)), (count(DISTINCT yv3.id)), (count(DISTINCT shoes.id)), (count(DISTINCT mez3.id)), (count(DISTINCT mez4.id)), (count(DISTINCT store.id))
  • Sort Method: quicksort Memory: 38kB
3. 0.030 2,952.357 ↑ 1,489.3 13 1

Hash Join (cost=1,310,409.05..1,334,145.89 rows=19,361 width=554) (actual time=2,945.390..2,952.357 rows=13 loops=1)

  • Hash Cond: (t.user_bo_id = ubo.id)
4. 6.981 2,912.713 ↑ 8,780.7 13 1

GroupAggregate (cost=1,307,005.02..1,328,978.71 rows=114,149 width=548) (actual time=2,905.758..2,912.713 rows=13 loops=1)

  • Group Key: t.user_bo_id, (date(t.date_end)), p.shop_id, s.id
5. 2.741 2,905.732 ↑ 24.3 4,692 1

Sort (cost=1,307,005.02..1,307,290.40 rows=114,149 width=112) (actual time=2,905.504..2,905.732 rows=4,692 loops=1)

  • Sort Key: t.user_bo_id, (date(t.date_end)), p.shop_id, s.id
  • Sort Method: quicksort Memory: 559kB
6. 1.735 2,902.991 ↑ 24.3 4,692 1

Hash Left Join (cost=259,341.11..1,297,416.19 rows=114,149 width=112) (actual time=2,847.636..2,902.991 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = store.id)
7. 1.612 2,753.936 ↑ 24.3 4,692 1

Nested Loop Left Join (cost=242,385.94..1,279,875.99 rows=114,149 width=116) (actual time=2,700.270..2,753.936 rows=4,692 loops=1)

  • Join Filter: (yv3.id = t.cell_from_id)
8. 2.383 2,681.944 ↑ 24.3 4,692 1

Nested Loop Left Join (cost=242,385.94..1,266,258.86 rows=114,149 width=112) (actual time=2,629.725..2,681.944 rows=4,692 loops=1)

  • Join Filter: (yv2.id = t.cell_from_id)
9. 1.174 2,609.181 ↑ 24.3 4,692 1

Hash Left Join (cost=242,385.94..1,252,641.74 rows=114,149 width=108) (actual time=2,558.448..2,609.181 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = shoes.id)
10. 1.734 2,540.795 ↑ 24.3 4,692 1

Hash Left Join (cost=230,480.64..1,240,436.78 rows=114,149 width=104) (actual time=2,491.218..2,540.795 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = mez4.id)
11. 1.553 2,467.400 ↑ 24.3 4,692 1

Hash Left Join (cost=218,427.69..1,228,084.18 rows=114,149 width=100) (actual time=2,419.519..2,467.400 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = mez3.id)
12. 1.404 2,392.347 ↑ 24.3 4,692 1

Hash Left Join (cost=206,374.74..1,215,731.58 rows=114,149 width=96) (actual time=2,345.984..2,392.347 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = yv1.id)
13. 1.198 2,316.172 ↑ 24.3 4,692 1

Hash Left Join (cost=194,198.39..1,203,255.58 rows=114,149 width=92) (actual time=2,271.173..2,316.172 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = shelf.id)
14. 1.132 2,245.231 ↑ 24.3 4,692 1

Hash Left Join (cost=182,286.80..1,191,044.34 rows=114,149 width=88) (actual time=2,201.393..2,245.231 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = gold.id)
15. 1.254 2,172.693 ↑ 24.3 4,692 1

Hash Left Join (cost=170,379.87..1,178,837.76 rows=114,149 width=84) (actual time=2,129.964..2,172.693 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = g_1.id)
16. 1.553 2,102.107 ↑ 24.3 4,692 1

Hash Left Join (cost=158,460.20..1,166,618.43 rows=114,149 width=80) (actual time=2,060.597..2,102.107 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = mez.id)
17. 1.303 2,023.788 ↑ 24.3 4,692 1

Hash Left Join (cost=146,220.31..1,154,078.89 rows=114,149 width=76) (actual time=1,983.789..2,023.788 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = pik2.id)
18. 1.986 1,950.004 ↑ 24.3 4,692 1

Hash Left Join (cost=134,273.20..1,141,832.13 rows=114,149 width=72) (actual time=1,911.271..1,950.004 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = pik1.id)
19. 1.283 1,854.668 ↑ 24.3 4,692 1

Hash Left Join (cost=122,216.34..1,129,475.61 rows=114,149 width=68) (actual time=1,817.864..1,854.668 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = zz.id)
20. 1.110 1,761.773 ↑ 24.3 4,692 1

Hash Left Join (cost=110,228.47..1,117,188.10 rows=114,149 width=64) (actual time=1,726.195..1,761.773 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = top2.id)
21. 1.131 1,669.118 ↑ 24.3 4,692 1

Hash Left Join (cost=98,313.37..1,104,973.35 rows=114,149 width=60) (actual time=1,634.626..1,669.118 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = bhl.id)
22. 0.927 1,576.874 ↑ 24.3 4,692 1

Hash Left Join (cost=86,382.92..1,092,743.25 rows=114,149 width=56) (actual time=1,543.483..1,576.874 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = m4.id)
23. 1.188 1,488.051 ↑ 24.3 4,692 1

Hash Left Join (cost=74,477.30..1,080,537.97 rows=114,149 width=52) (actual time=1,455.566..1,488.051 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = m3.id)
24. 0.923 1,412.171 ↑ 24.3 4,692 1

Hash Left Join (cost=62,570.45..1,068,331.47 rows=114,149 width=48) (actual time=1,380.852..1,412.171 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = m2.id)
25. 1.341 1,336.319 ↑ 24.3 4,692 1

Hash Left Join (cost=50,664.34..1,056,125.70 rows=114,149 width=44) (actual time=1,305.902..1,336.319 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = inst.id)
26. 0.996 1,262.483 ↑ 24.3 4,692 1

Hash Left Join (cost=38,749.32..1,043,911.04 rows=114,149 width=40) (actual time=1,233.319..1,262.483 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = e.id)
27. 0.000 1,186.085 ↑ 24.3 4,692 1

Hash Left Join (cost=26,837.17..1,031,699.23 rows=114,149 width=36) (actual time=1,157.881..1,186.085 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = box.id)
28. 0.000 1,198.432 ↑ 24.3 4,692 1

Gather (cost=14,599.50..1,019,161.91 rows=114,149 width=32) (actual time=1,070.686..1,198.432 rows=4,692 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
29. 0.902 1,351.484 ↑ 30.4 1,564 3

Parallel Hash Left Join (cost=4,599.50..997,747.01 rows=47,562 width=32) (actual time=1,147.519..1,351.484 rows=1,564 loops=3)

  • Hash Cond: (t.product_id = fl.prod_id)
30. 0.986 1,346.148 ↑ 30.4 1,564 3

Hash Left Join (cost=317.06..993,284.59 rows=47,562 width=32) (actual time=1,142.825..1,346.148 rows=1,564 loops=3)

  • Hash Cond: ((p.shop_id)::text = s.catpro_p)
31. 22.829 1,344.211 ↑ 30.4 1,564 3

Nested Loop (cost=0.99..991,660.57 rows=47,562 width=28) (actual time=1,141.770..1,344.211 rows=1,564 loops=3)

32. 1,321.368 1,321.368 ↑ 30.4 1,564 3

Parallel Index Scan using tbl_store_tasks_user_bo_id_category_id_status_id_date_end_index on tbl_store_tasks t (cost=0.56..832,658.45 rows=47,562 width=24) (actual time=1,141.680..1,321.368 rows=1,564 loops=3)

  • Index Cond: ((user_bo_id IS NOT NULL) AND (category_id = 2) AND (status_id = 4) AND (date(date_end) >= '2019-06-30'::date) AND (date(date_end) <= '2019-06-30'::date))
33. 0.001 0.014 ↑ 2.0 1 4,692

Append (cost=0.42..3.32 rows=2 width=8) (actual time=0.008..0.014 rows=1 loops=4,692)

34. 0.008 0.008 ↑ 1.0 1 4,692

Index Scan using tbl_products_pkey on tbl_products p (cost=0.42..1.53 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=4,692)

  • Index Cond: (id = t.product_id)
35. 0.005 0.005 ↓ 0.0 0 4,692

Index Scan using tbl_products_int_pkey on tbl_products_int p_1 (cost=0.43..1.78 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=4,692)

  • Index Cond: (id = t.product_id)
36. 0.099 0.951 ↑ 3.9 444 3

Hash (cost=294.17..294.17 rows=1,752 width=10) (actual time=0.951..0.951 rows=444 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 35kB
37. 0.787 0.852 ↑ 3.9 444 3

Bitmap Heap Scan on tbl_suppliers s (cost=8.93..294.17 rows=1,752 width=10) (actual time=0.096..0.852 rows=444 loops=3)

  • Recheck Cond: (catpro_p IS NOT NULL)
  • Heap Blocks: exact=170
38. 0.065 0.065 ↑ 1.0 444 3

Bitmap Index Scan on tbl_suppliers_catpro_p_idx (cost=0.00..8.49 rows=444 width=0) (actual time=0.065..0.065 rows=444 loops=3)

39. 0.000 4.434 ↑ 1.2 123 3

Parallel Hash (cost=4,280.61..4,280.61 rows=146 width=8) (actual time=4.434..4.434 rows=123 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 40kB
40. 0.033 13.162 ↓ 2.5 370 1

Parallel Append (cost=0.42..4,280.61 rows=146 width=8) (actual time=0.419..13.162 rows=370 loops=1)

41. 6.968 6.968 ↓ 2.5 357 1

Parallel Index Only Scan using bnd_prod_flags_idx on bnd_prod_flags fl (cost=0.42..2,391.02 rows=141 width=8) (actual time=0.055..6.968 rows=357 loops=1)

  • Index Cond: (flag_id = 3)
  • Heap Fetches: 357
42. 6.161 6.161 ↓ 2.6 13 1

Parallel Index Only Scan using bnd_prod_flags_int_idx on bnd_prod_flags_int fl_1 (cost=0.42..1,888.86 rows=5 width=8) (actual time=0.418..6.161 rows=13 loops=1)

  • Index Cond: (flag_id = 3)
  • Heap Fetches: 13
43. 5.904 87.156 ↓ 1.0 26,973 1

Hash (cost=11,904.89..11,904.89 rows=26,623 width=4) (actual time=87.156..87.156 rows=26,973 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1205kB
44. 81.252 81.252 ↓ 1.0 26,973 1

Seq Scan on tbl_store_cells box (cost=0.00..11,904.89 rows=26,623 width=4) (actual time=0.029..81.252 rows=26,973 loops=1)

  • Filter: (gathering_group = 'wms_priority_box'::text)
  • Rows Removed by Filter: 169026
45. 0.096 75.402 ↑ 1.1 537 1

Hash (cost=11,904.89..11,904.89 rows=581 width=4) (actual time=75.402..75.402 rows=537 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 27kB
46. 75.306 75.306 ↑ 1.1 537 1

Seq Scan on tbl_store_cells e (cost=0.00..11,904.89 rows=581 width=4) (actual time=0.062..75.306 rows=537 loops=1)

  • Filter: (gathering_group = 'wms_priority_e'::text)
  • Rows Removed by Filter: 195462
47. 0.176 72.495 ↑ 1.1 755 1

Hash (cost=11,904.89..11,904.89 rows=810 width=4) (actual time=72.495..72.495 rows=755 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
48. 72.319 72.319 ↑ 1.1 755 1

Seq Scan on tbl_store_cells inst (cost=0.00..11,904.89 rows=810 width=4) (actual time=0.020..72.319 rows=755 loops=1)

  • Filter: (gathering_group = 'wms_priority_inst'::text)
  • Rows Removed by Filter: 195244
49. 0.041 74.929 ↓ 1.5 143 1

Hash (cost=11,904.89..11,904.89 rows=98 width=4) (actual time=74.929..74.929 rows=143 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
50. 74.888 74.888 ↓ 1.5 143 1

Seq Scan on tbl_store_cells m2 (cost=0.00..11,904.89 rows=98 width=4) (actual time=0.953..74.888 rows=143 loops=1)

  • Filter: (gathering_group = 'wms_priority_m2'::text)
  • Rows Removed by Filter: 195856
51. 0.041 74.692 ↑ 1.1 144 1

Hash (cost=11,904.89..11,904.89 rows=157 width=4) (actual time=74.692..74.692 rows=144 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
52. 74.651 74.651 ↑ 1.1 144 1

Seq Scan on tbl_store_cells m3 (cost=0.00..11,904.89 rows=157 width=4) (actual time=0.935..74.651 rows=144 loops=1)

  • Filter: (gathering_group = 'wms_priority_m3'::text)
  • Rows Removed by Filter: 195855
53. 0.017 87.896 ↑ 1.0 59 1

Hash (cost=11,904.89..11,904.89 rows=59 width=4) (actual time=87.896..87.896 rows=59 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
54. 87.879 87.879 ↑ 1.0 59 1

Seq Scan on tbl_store_cells m4 (cost=0.00..11,904.89 rows=59 width=4) (actual time=0.200..87.879 rows=59 loops=1)

  • Filter: (gathering_group = 'wms_priority_m4'::text)
  • Rows Removed by Filter: 195940
55. 0.417 91.113 ↓ 1.0 2,074 1

Hash (cost=11,904.89..11,904.89 rows=2,045 width=4) (actual time=91.113..91.113 rows=2,074 loops=1)

  • Buckets: 4096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 105kB
56. 90.696 90.696 ↓ 1.0 2,074 1

Seq Scan on tbl_store_cells bhl (cost=0.00..11,904.89 rows=2,045 width=4) (actual time=0.049..90.696 rows=2,074 loops=1)

  • Filter: (gathering_group = 'wms_terminal_bhl'::text)
  • Rows Removed by Filter: 193925
57. 0.170 91.545 ↑ 1.1 775 1

Hash (cost=11,904.89..11,904.89 rows=817 width=4) (actual time=91.545..91.545 rows=775 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
58. 91.375 91.375 ↑ 1.1 775 1

Seq Scan on tbl_store_cells top2 (cost=0.00..11,904.89 rows=817 width=4) (actual time=4.571..91.375 rows=775 loops=1)

  • Filter: (gathering_group = 'wms_terminal_top'::text)
  • Rows Removed by Filter: 195224
59. 1.274 91.612 ↑ 1.0 6,512 1

Hash (cost=11,904.89..11,904.89 rows=6,638 width=4) (actual time=91.612..91.612 rows=6,512 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 293kB
60. 90.338 90.338 ↑ 1.0 6,512 1

Seq Scan on tbl_store_cells zz (cost=0.00..11,904.89 rows=6,638 width=4) (actual time=0.120..90.338 rows=6,512 loops=1)

  • Filter: (gathering_group = 'wms_terminal_z'::text)
  • Rows Removed by Filter: 189487
61. 2.109 93.350 ↑ 1.0 12,128 1

Hash (cost=11,904.89..11,904.89 rows=12,158 width=4) (actual time=93.350..93.350 rows=12,128 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 555kB
62. 91.241 91.241 ↑ 1.0 12,128 1

Seq Scan on tbl_store_cells pik1 (cost=0.00..11,904.89 rows=12,158 width=4) (actual time=0.035..91.241 rows=12,128 loops=1)

  • Filter: (gathering_group = 'wms_priority_pik1'::text)
  • Rows Removed by Filter: 183871
63. 0.494 72.481 ↑ 1.0 3,330 1

Hash (cost=11,904.89..11,904.89 rows=3,378 width=4) (actual time=72.481..72.481 rows=3,330 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 150kB
64. 71.987 71.987 ↑ 1.0 3,330 1

Seq Scan on tbl_store_cells pik2 (cost=0.00..11,904.89 rows=3,378 width=4) (actual time=0.111..71.987 rows=3,330 loops=1)

  • Filter: (gathering_group = 'wms_priority_pik2'::text)
  • Rows Removed by Filter: 192669
65. 3.893 76.766 ↓ 1.0 26,819 1

Hash (cost=11,904.89..11,904.89 rows=26,800 width=4) (actual time=76.766..76.766 rows=26,819 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1199kB
66. 72.873 72.873 ↓ 1.0 26,819 1

Seq Scan on tbl_store_cells mez (cost=0.00..11,904.89 rows=26,800 width=4) (actual time=0.061..72.873 rows=26,819 loops=1)

  • Filter: (gathering_group = 'wms_priority_mezonin'::text)
  • Rows Removed by Filter: 169180
67. 0.183 69.332 ↓ 1.1 1,271 1

Hash (cost=11,904.89..11,904.89 rows=1,183 width=4) (actual time=69.332..69.332 rows=1,271 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 61kB
68. 69.149 69.149 ↓ 1.1 1,271 1

Seq Scan on tbl_store_cells g_1 (cost=0.00..11,904.89 rows=1,183 width=4) (actual time=0.078..69.149 rows=1,271 loops=1)

  • Filter: (gathering_group = 'wms_priority_g'::text)
  • Rows Removed by Filter: 194728
69. 0.038 71.406 ↑ 1.2 138 1

Hash (cost=11,904.89..11,904.89 rows=163 width=4) (actual time=71.406..71.406 rows=138 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
70. 71.368 71.368 ↑ 1.2 138 1

Seq Scan on tbl_store_cells gold (cost=0.00..11,904.89 rows=163 width=4) (actual time=3.075..71.368 rows=138 loops=1)

  • Filter: (gathering_group = 'wms_priority_gold'::text)
  • Rows Removed by Filter: 195861
71. 0.091 69.743 ↑ 1.1 507 1

Hash (cost=11,904.89..11,904.89 rows=536 width=4) (actual time=69.743..69.743 rows=507 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
72. 69.652 69.652 ↑ 1.1 507 1

Seq Scan on tbl_store_cells shelf (cost=0.00..11,904.89 rows=536 width=4) (actual time=0.275..69.652 rows=507 loops=1)

  • Filter: (gathering_group = 'wms_priority_shelf'::text)
  • Rows Removed by Filter: 195492
73. 2.941 74.771 ↓ 1.0 21,952 1

Hash (cost=11,904.89..11,904.89 rows=21,717 width=4) (actual time=74.771..74.771 rows=21,952 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1028kB
74. 71.830 71.830 ↓ 1.0 21,952 1

Seq Scan on tbl_store_cells yv1 (cost=0.00..11,904.89 rows=21,717 width=4) (actual time=0.016..71.830 rows=21,952 loops=1)

  • Filter: (gathering_group = 'wms_priority_yv1'::text)
  • Rows Removed by Filter: 174047
75. 2.049 73.500 ↓ 1.0 11,961 1

Hash (cost=11,904.89..11,904.89 rows=11,845 width=4) (actual time=73.500..73.500 rows=11,961 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 549kB
76. 71.451 71.451 ↓ 1.0 11,961 1

Seq Scan on tbl_store_cells mez3 (cost=0.00..11,904.89 rows=11,845 width=4) (actual time=0.098..71.451 rows=11,961 loops=1)

  • Filter: (gathering_group = 'wms_priority_mezonin3'::text)
  • Rows Removed by Filter: 184038
77. 1.729 71.661 ↑ 1.0 11,779 1

Hash (cost=11,904.89..11,904.89 rows=11,845 width=4) (actual time=71.661..71.661 rows=11,779 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 543kB
78. 69.932 69.932 ↑ 1.0 11,779 1

Seq Scan on tbl_store_cells mez4 (cost=0.00..11,904.89 rows=11,845 width=4) (actual time=0.299..69.932 rows=11,779 loops=1)

  • Filter: (gathering_group = 'wms_priority_mezonin4'::text)
  • Rows Removed by Filter: 184220
79. 0.009 67.212 ↑ 1.0 32 1

Hash (cost=11,904.89..11,904.89 rows=33 width=4) (actual time=67.212..67.212 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
80. 67.203 67.203 ↑ 1.0 32 1

Seq Scan on tbl_store_cells shoes (cost=0.00..11,904.89 rows=33 width=4) (actual time=5.371..67.203 rows=32 loops=1)

  • Filter: (gathering_group = 'wms_priority_shoes'::text)
  • Rows Removed by Filter: 195967
81. 0.000 70.380 ↓ 0.0 0 4,692

Materialize (cost=0.00..11,904.89 rows=1 width=4) (actual time=0.015..0.015 rows=0 loops=4,692)

82. 71.266 71.266 ↓ 0.0 0 1

Seq Scan on tbl_store_cells yv2 (cost=0.00..11,904.89 rows=1 width=4) (actual time=71.266..71.266 rows=0 loops=1)

  • Filter: (gathering_group = 'wms_priority_yv2'::text)
  • Rows Removed by Filter: 195999
83. 0.000 70.380 ↓ 0.0 0 4,692

Materialize (cost=0.00..11,904.89 rows=1 width=4) (actual time=0.015..0.015 rows=0 loops=4,692)

84. 70.536 70.536 ↓ 0.0 0 1

Seq Scan on tbl_store_cells yv3 (cost=0.00..11,904.89 rows=1 width=4) (actual time=70.536..70.536 rows=0 loops=1)

  • Filter: (gathering_group = 'wms_priority_yv3'::text)
  • Rows Removed by Filter: 195999
85. 10.916 147.320 ↓ 2.2 68,110 1

Hash (cost=16,559.86..16,559.86 rows=31,625 width=4) (actual time=147.320..147.320 rows=68,110 loops=1)

  • Buckets: 131072 (originally 32768) Batches: 1 (originally 1) Memory Usage: 3419kB
86. 136.404 136.404 ↓ 2.2 68,110 1

Seq Scan on tbl_store_cells store (cost=0.00..16,559.86 rows=31,625 width=4) (actual time=0.016..136.404 rows=68,110 loops=1)

  • Filter: ((gathering_group <> ALL ('{wms_priority_box,wms_priority_e,wms_priority_inst,wms_priority_m2,wms_priority_m3,wms_priority_m4,wms_terminal_bhl,wms_terminal_top,wms_terminal_z,wms_priority_pik1,wms_priority_pik2,wms_priority_mezonin,wms_priority_g,wms_priority_gold,wms_priority_shelf,wms_priority_yv1,wms_priority_yv2,wms_priority_yv3,wms_priority_mezonin3,wms_priority_mezonin4,wms_priority_shoes}'::text[])) OR ((gathering_group IS NULL) AND (id IS NOT NULL)))
  • Rows Removed by Filter: 127889
87. 0.756 39.614 ↑ 1.0 4,069 1

Hash (cost=3,352.75..3,352.75 rows=4,102 width=18) (actual time=39.614..39.614 rows=4,069 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 250kB
88. 15.945 38.858 ↑ 1.0 4,069 1

Nested Loop Left Join (cost=15.62..3,352.75 rows=4,102 width=18) (actual time=0.559..38.858 rows=4,069 loops=1)

  • Join Filter: (g.key = ANY (ubo.groups))
  • Rows Removed by Join Filter: 48920
89. 18.844 18.844 ↑ 1.0 4,069 1

Seq Scan on tbl_user_bo ubo (cost=0.00..1,991.06 rows=4,102 width=108) (actual time=0.468..18.844 rows=4,069 loops=1)

  • Filter: ('sm_store'::text = ANY (groups))
  • Rows Removed by Filter: 19920
90. 3.988 4.069 ↑ 1.0 13 4,069

Materialize (cost=15.62..28.57 rows=13 width=14) (actual time=0.000..0.001 rows=13 loops=4,069)

91. 0.017 0.081 ↑ 1.0 13 1

Bitmap Heap Scan on lst_user_bo_groups g (cost=15.62..28.50 rows=13 width=14) (actual time=0.069..0.081 rows=13 loops=1)

  • Recheck Cond: (key = ANY ('{wms_vls,wms_autlog,wms_gvardiya,wms_ekc,wms_inklin_service,wms_liderteam,wms_our_staff,wms_patriot,wms_staff_plus,wms_staff_plus_serv,wms_resource,wms_fresh,wms_shtat}'::text[]))
  • Heap Blocks: exact=5
92. 0.064 0.064 ↑ 1.0 13 1

Bitmap Index Scan on lst_user_bo_groups_key_key (cost=0.00..15.61 rows=13 width=0) (actual time=0.064..0.064 rows=13 loops=1)

  • Index Cond: (key = ANY ('{wms_vls,wms_autlog,wms_gvardiya,wms_ekc,wms_inklin_service,wms_liderteam,wms_our_staff,wms_patriot,wms_staff_plus,wms_staff_plus_serv,wms_resource,wms_fresh,wms_shtat}'::text[]))
Planning time : 25.998 ms
Execution time : 3,054.438 ms