explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QGt

Settings
# exclusive inclusive rows x rows loops node
1. 0.054 6,333.980 ↑ 878.1 13 1

GroupAggregate (cost=1,676,196.67..1,680,043.97 rows=11,415 width=572) (actual time=6,333.957..6,333.980 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.051 6,333.926 ↑ 1,489.3 13 1

Sort (cost=1,676,196.67..1,676,245.07 rows=19,361 width=554) (actual time=6,333.925..6,333.926 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.033 6,333.875 ↑ 1,489.3 13 1

Hash Join (cost=1,651,081.24..1,674,818.08 rows=19,361 width=554) (actual time=6,326.444..6,333.875 rows=13 loops=1)

  • Hash Cond: (t.user_bo_id = ubo.id)
4. 7.428 6,296.627 ↑ 8,780.7 13 1

GroupAggregate (cost=1,647,677.22..1,669,650.90 rows=114,149 width=548) (actual time=6,289.210..6,296.627 rows=13 loops=1)

  • Group Key: t.user_bo_id, (date(t.date_end)), p.shop_id, s.id
5. 2.456 6,289.199 ↑ 24.3 4,692 1

Sort (cost=1,647,677.22..1,647,962.59 rows=114,149 width=112) (actual time=6,288.968..6,289.199 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.708 6,286.743 ↑ 24.3 4,692 1

Hash Left Join (cost=259,340.55..1,638,088.39 rows=114,149 width=112) (actual time=6,216.306..6,286.743 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = store.id)
7. 1.535 6,140.884 ↑ 24.3 4,692 1

Nested Loop Left Join (cost=242,385.37..1,620,548.18 rows=114,149 width=116) (actual time=6,072.113..6,140.884 rows=4,692 loops=1)

  • Join Filter: (yv3.id = t.cell_from_id)
8. 0.665 6,068.969 ↑ 24.3 4,692 1

Nested Loop Left Join (cost=242,385.37..1,606,931.06 rows=114,149 width=112) (actual time=6,001.821..6,068.969 rows=4,692 loops=1)

  • Join Filter: (yv2.id = t.cell_from_id)
9. 1.598 5,997.924 ↑ 24.3 4,692 1

Hash Left Join (cost=242,385.37..1,593,313.93 rows=114,149 width=108) (actual time=5,932.559..5,997.924 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = shoes.id)
10. 1.450 5,926.312 ↑ 24.3 4,692 1

Hash Left Join (cost=230,480.07..1,581,108.98 rows=114,149 width=104) (actual time=5,862.515..5,926.312 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = mez4.id)
11. 1.409 5,848.076 ↑ 24.3 4,692 1

Hash Left Join (cost=218,427.12..1,568,756.38 rows=114,149 width=100) (actual time=5,785.699..5,848.076 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = mez3.id)
12. 1.904 5,774.294 ↑ 24.3 4,692 1

Hash Left Join (cost=206,374.17..1,556,403.78 rows=114,149 width=96) (actual time=5,713.308..5,774.294 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = yv1.id)
13. 1.187 5,696.102 ↑ 24.3 4,692 1

Hash Left Join (cost=194,197.82..1,543,927.78 rows=114,149 width=92) (actual time=5,636.973..5,696.102 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = shelf.id)
14. 1.160 5,624.809 ↑ 24.3 4,692 1

Hash Left Join (cost=182,286.23..1,531,716.54 rows=114,149 width=88) (actual time=5,566.849..5,624.809 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = gold.id)
15. 1.225 5,552.090 ↑ 24.3 4,692 1

Hash Left Join (cost=170,379.31..1,519,509.96 rows=114,149 width=84) (actual time=5,495.269..5,552.090 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = g_1.id)
16. 1.523 5,481.088 ↑ 24.3 4,692 1

Hash Left Join (cost=158,459.63..1,507,290.63 rows=114,149 width=80) (actual time=5,425.474..5,481.088 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = mez.id)
17. 1.230 5,402.768 ↑ 24.3 4,692 1

Hash Left Join (cost=146,219.75..1,494,751.09 rows=114,149 width=76) (actual time=5,348.637..5,402.768 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = pik2.id)
18. 1.706 5,331.639 ↑ 24.3 4,692 1

Hash Left Join (cost=134,272.63..1,482,504.33 rows=114,149 width=72) (actual time=5,278.722..5,331.639 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = pik1.id)
19. 1.209 5,256.809 ↑ 24.3 4,692 1

Hash Left Join (cost=122,215.77..1,470,147.81 rows=114,149 width=68) (actual time=5,205.566..5,256.809 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = zz.id)
20. 1.339 5,182.630 ↑ 24.3 4,692 1

Hash Left Join (cost=110,227.91..1,457,860.30 rows=114,149 width=64) (actual time=5,132.576..5,182.630 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = top2.id)
21. 1.154 5,113.155 ↑ 24.3 4,692 1

Hash Left Join (cost=98,312.81..1,445,645.54 rows=114,149 width=60) (actual time=5,064.427..5,113.155 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = bhl.id)
22. 0.913 5,049.397 ↑ 24.3 4,692 1

Hash Left Join (cost=86,382.36..1,433,415.44 rows=114,149 width=56) (actual time=5,001.802..5,049.397 rows=4,692 loops=1)

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

Hash Left Join (cost=74,476.73..1,421,210.17 rows=114,149 width=52) (actual time=4,937.419..4,984.115 rows=4,692 loops=1)

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

Hash Left Join (cost=62,569.88..1,409,003.66 rows=114,149 width=48) (actual time=4,874.931..4,920.470 rows=4,692 loops=1)

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

Hash Left Join (cost=50,663.77..1,396,797.90 rows=114,149 width=44) (actual time=4,813.869..4,858.203 rows=4,692 loops=1)

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

Hash Left Join (cost=38,748.76..1,384,583.23 rows=114,149 width=40) (actual time=4,751.690..4,795.057 rows=4,692 loops=1)

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

Hash Left Join (cost=26,836.61..1,372,371.43 rows=114,149 width=36) (actual time=4,689.399..4,731.810 rows=4,692 loops=1)

  • Hash Cond: (t.cell_from_id = box.id)
28. 501.881 5,186.736 ↑ 24.3 4,692 1

Gather (cost=14,598.93..1,359,834.10 rows=114,149 width=32) (actual time=4,610.510..5,186.736 rows=4,692 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
29. 1.120 4,684.855 ↑ 30.4 1,564 3

Parallel Hash Left Join (cost=4,598.93..1,338,419.20 rows=47,562 width=32) (actual time=4,595.270..4,684.855 rows=1,564 loops=3)

  • Hash Cond: (t.product_id = fl.prod_id)
30. 1.087 4,672.106 ↑ 30.4 1,564 3

Hash Left Join (cost=316.50..1,333,956.79 rows=47,562 width=32) (actual time=4,583.416..4,672.106 rows=1,564 loops=3)

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

Nested Loop (cost=0.42..1,332,332.76 rows=47,562 width=28) (actual time=4,582.428..4,670.176 rows=1,564 loops=3)

32. 4,648.692 4,648.692 ↑ 30.4 1,564 3

Parallel Seq Scan on tbl_store_tasks t (cost=0.00..1,173,330.65 rows=47,562 width=24) (actual time=4,582.282..4,648.692 rows=1,564 loops=3)

  • Filter: ((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))
  • Rows Removed by Filter: 11660734
33. 0.001 0.013 ↑ 2.0 1 4,692

Append (cost=0.42..3.32 rows=2 width=8) (actual time=0.008..0.013 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.004 0.004 ↓ 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.004..0.004 rows=0 loops=4,692)

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

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

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

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

  • Recheck Cond: (catpro_p IS NOT NULL)
  • Heap Blocks: exact=170
38. 0.059 0.059 ↑ 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.059..0.059 rows=444 loops=3)

39. 0.083 11.629 ↑ 1.2 123 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 104kB
40. 0.000 11.546 ↑ 1.2 123 3

Parallel Append (cost=0.42..4,280.61 rows=146 width=8) (actual time=0.292..11.546 rows=123 loops=3)

41. 7.710 7.710 ↑ 1.2 119 3

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.124..7.710 rows=119 loops=3)

  • Index Cond: (flag_id = 3)
  • Heap Fetches: 357
42. 11.457 11.457 ↓ 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.600..11.457 rows=13 loops=1)

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

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

  • Buckets: 32768 Batches: 1 Memory Usage: 1205kB
44. 74.511 74.511 ↓ 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.033..74.511 rows=26,973 loops=1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Buckets: 4096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 105kB
56. 62.280 62.280 ↓ 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.018..62.280 rows=2,074 loops=1)

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

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

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

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

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

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

  • Buckets: 8192 Batches: 1 Memory Usage: 293kB
60. 71.976 71.976 ↑ 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.062..71.976 rows=6,512 loops=1)

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

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

  • Buckets: 16384 Batches: 1 Memory Usage: 555kB
62. 71.410 71.410 ↑ 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.020..71.410 rows=12,128 loops=1)

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

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

  • Buckets: 4096 Batches: 1 Memory Usage: 150kB
64. 69.412 69.412 ↑ 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.071..69.412 rows=3,330 loops=1)

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

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

  • Buckets: 32768 Batches: 1 Memory Usage: 1199kB
66. 72.907 72.907 ↓ 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.065..72.907 rows=26,819 loops=1)

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

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

  • Buckets: 2048 Batches: 1 Memory Usage: 61kB
68. 69.589 69.589 ↓ 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.082..69.589 rows=1,271 loops=1)

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

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

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

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

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

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

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

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

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

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

  • Buckets: 32768 Batches: 1 Memory Usage: 1028kB
74. 73.353 73.353 ↓ 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.022..73.353 rows=21,952 loops=1)

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

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

  • Buckets: 16384 Batches: 1 Memory Usage: 549kB
76. 70.652 70.652 ↓ 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.077..70.652 rows=11,961 loops=1)

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

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

  • Buckets: 16384 Batches: 1 Memory Usage: 543kB
78. 74.980 74.980 ↑ 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.304..74.980 rows=11,779 loops=1)

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

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

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

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

  • Filter: (gathering_group = 'wms_priority_shoes'::text)
  • Rows Removed by Filter: 195967
81. 1.133 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. 69.247 69.247 ↓ 0.0 0 1

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

  • Filter: (gathering_group = 'wms_priority_yv2'::text)
  • Rows Removed by Filter: 195999
83. 0.095 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.285 70.285 ↓ 0.0 0 1

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

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

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

  • Buckets: 131072 (originally 32768) Batches: 1 (originally 1) Memory Usage: 3419kB
86. 132.804 132.804 ↓ 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.029..132.804 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.801 37.215 ↑ 1.0 4,069 1

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

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

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

  • Join Filter: (g.key = ANY (ubo.groups))
  • Rows Removed by Join Filter: 48920
89. 15.441 15.441 ↑ 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.163..15.441 rows=4,069 loops=1)

  • Filter: ('sm_store'::text = ANY (groups))
  • Rows Removed by Filter: 19920
90. 3.929 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.057 0.140 ↑ 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.107..0.140 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.083 0.083 ↑ 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.083..0.083 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 : 26.576 ms
Execution time : 6,870.373 ms