explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bLa3

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=1,366,759.17..1,366,759.24 rows=29 width=3,606) (actual rows= loops=)

  • Sort Key: a.vendor_po_no
2. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1,336,390.48..1,366,758.47 rows=29 width=3,606) (actual rows= loops=)

  • Hash Cond: ((item_sku.item_sid = a.item_sid) AND ((item_sku.color_sid)::bpchar = a.specification_color_sid))
3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=504,066.87..531,005.82 rows=195,920 width=98) (actual rows= loops=)

  • Group Key: item_sku.item_sid, item_sku.color_sid
4. 0.000 0.000 ↓ 0.0

Sort (cost=504,066.87..508,964.86 rows=1,959,196 width=82) (actual rows= loops=)

  • Sort Key: item_sku.item_sid, item_sku.color_sid
5. 0.000 0.000 ↓ 0.0

Seq Scan on item_sku (cost=0.00..111,810.96 rows=1,959,196 width=82) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=832,323.52..832,323.52 rows=6 width=3,670) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Subquery Scan on a (cost=832,317.54..832,323.52 rows=6 width=3,670) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=832,317.54..832,323.46 rows=6 width=3,736) (actual rows= loops=)

  • Group Key: cpmdoc.doc_sid, vpo.vendor_po_no, vpoic_1.vendor_po_item_sid
9. 0.000 0.000 ↓ 0.0

Sort (cost=832,317.54..832,317.55 rows=6 width=574) (actual rows= loops=)

  • Sort Key: cpmdoc.doc_sid, vpo.vendor_po_no, vpoic_1.vendor_po_item_sid
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=555,380.06..832,317.46 rows=6 width=574) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=555,379.50..822,939.72 rows=1 width=527) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=555,379.09..822,933.75 rows=1 width=560) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=555,378.68..822,928.52 rows=1 width=554) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=555,378.26..822,923.24 rows=1 width=430) (actual rows= loops=)

  • Join Filter: (vpoic_1.vendor_po_item_sid = vpoitem.sid)
15. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=222,361.93..414,200.82 rows=1 width=398) (actual rows= loops=)

  • Hash Cond: ((vpoic.vendor_po_item_sid = vpoitem.sid) AND ((vposi.vendor_po_shipment_sid)::bpchar = vpoship.sid))
16. 0.000 0.000 ↓ 0.0

Hash Join (cost=164,062.65..346,933.05 rows=1,195,797 width=107) (actual rows= loops=)

  • Hash Cond: ((vposic.vendor_po_item_color_sid)::bpchar = vpoic.sid)
17. 0.000 0.000 ↓ 0.0

Hash Join (cost=56,705.06..178,537.54 rows=1,196,156 width=99) (actual rows= loops=)

  • Hash Cond: (vposic.vendor_po_shipment_d_sid = vposi.sid)
18. 0.000 0.000 ↓ 0.0

Seq Scan on vendor_po_shipment_d_c vposic (cost=0.00..71,405.56 rows=1,196,156 width=99) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash (cost=36,231.36..36,231.36 rows=845,336 width=66) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on vendor_po_shipment_d vposi (cost=0.00..36,231.36 rows=845,336 width=66) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash (cost=66,638.15..66,638.15 rows=1,616,115 width=74) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on vendor_po_item_color vpoic (cost=0.00..66,638.15 rows=1,616,115 width=74) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash (cost=58,299.27..58,299.27 rows=1 width=390) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,110.04..58,299.27 rows=1 width=390) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,109.62..58,293.96 rows=1 width=305) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,109.19..58,288.68 rows=1 width=272) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,108.77..58,283.19 rows=1 width=234) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,108.36..58,277.23 rows=1 width=252) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Gather (cost=2,107.94..58,271.37 rows=1 width=272) (actual rows= loops=)

  • Workers Planned: 2
30. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,107.94..57,271.27 rows=1 width=272) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,107.52..57,241.86 rows=1 width=206) (actual rows= loops=)

  • Hash Cond: ((vpo.team)::bpchar = hcl4.sid)
32. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on vendor_po vpo (cost=0.00..56,133.63 rows=272 width=224) (actual rows= loops=)

  • Filter: (is_latest AND ((doc_status)::text <> 'inactive'::text) AND (lower((year)::text) = '2019'::text))
33. 0.000 0.000 ↓ 0.0

Hash (cost=1,106.27..1,106.27 rows=100 width=48) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on hcl_entry hcl4 (cost=0.00..1,106.27 rows=100 width=48) (actual rows= loops=)

  • Filter: (lower((name)::text) = 'toys team'::text)
35. 0.000 0.000 ↓ 0.0

Index Scan using cpm_document_doc_sid_idx on cpm_document cpmdoc (cost=0.42..29.40 rows=1 width=99) (actual rows= loops=)

  • Index Cond: (doc_sid = vpo.sid)
  • Filter: ((NOT is_deleted) AND is_latest AND ((ref_entity_name)::text = 'VpoShipDtl'::text))
36. 0.000 0.000 ↓ 0.0

Index Scan using hcl_entry_pk on hcl_entry hcl1 (cost=0.41..5.85 rows=1 width=46) (actual rows= loops=)

  • Index Cond: (sid = (vpo.merchandise_hierarchy)::bpchar)
37. 0.000 0.000 ↓ 0.0

Index Scan using hcl_entry_pk on hcl_entry hcl3 (cost=0.41..5.86 rows=1 width=48) (actual rows= loops=)

  • Index Cond: (sid = (vpo.sourcing_office)::bpchar)
  • Filter: ((name IS NOT NULL) AND ((name)::text <> 'Turkey'::text) AND (lower((name)::text) = 'hong kong'::text))
38. 0.000 0.000 ↓ 0.0

Index Scan using vendor_po_shipment_d_pk on vendor_po_shipment_d vposhipd (cost=0.42..5.49 rows=1 width=104) (actual rows= loops=)

  • Index Cond: (sid = cpmdoc.ref_doc_sid)
39. 0.000 0.000 ↓ 0.0

Index Scan using vendor_po_shipment_pk on vendor_po_shipment vpoship (cost=0.42..5.28 rows=1 width=66) (actual rows= loops=)

  • Index Cond: (sid = (vposhipd.vendor_po_shipment_sid)::bpchar)
40. 0.000 0.000 ↓ 0.0

Index Scan using vendor_po_item_pk on vendor_po_item vpoitem (cost=0.42..5.31 rows=1 width=118) (actual rows= loops=)

  • Index Cond: (sid = (vposhipd.vendor_po_item_sid)::bpchar)
41. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=333,016.32..403,202.35 rows=245,336 width=65) (actual rows= loops=)

  • Group Key: vpoic_1.vendor_po_item_sid
42. 0.000 0.000 ↓ 0.0

Gather Merge (cost=333,016.32..396,455.61 rows=490,672 width=65) (actual rows= loops=)

  • Workers Planned: 2
43. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=332,016.30..338,819.87 rows=245,336 width=65) (actual rows= loops=)

  • Group Key: vpoic_1.vendor_po_item_sid
44. 0.000 0.000 ↓ 0.0

Sort (cost=332,016.30..333,261.92 rows=498,249 width=37) (actual rows= loops=)

  • Sort Key: vpoic_1.vendor_po_item_sid
45. 0.000 0.000 ↓ 0.0

Hash Join (cost=159,181.65..271,240.23 rows=498,249 width=37) (actual rows= loops=)

  • Hash Cond: ((vposic_1.vendor_po_item_color_sid)::bpchar = vpoic_1.sid)
46. 0.000 0.000 ↓ 0.0

Hash Join (cost=53,403.06..137,426.35 rows=498,398 width=37) (actual rows= loops=)

  • Hash Cond: (vposic_1.vendor_po_shipment_d_sid = vposi_1.sid)
47. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on vendor_po_shipment_d_c vposic_1 (cost=0.00..64,427.98 rows=498,398 width=70) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Hash (cost=36,231.36..36,231.36 rows=845,336 width=33) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Seq Scan on vendor_po_shipment_d vposi_1 (cost=0.00..36,231.36 rows=845,336 width=33) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Hash (cost=66,638.15..66,638.15 rows=1,616,115 width=66) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Seq Scan on vendor_po_item_color vpoic_1 (cost=0.00..66,638.15 rows=1,616,115 width=66) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Index Scan using item_pk on item (cost=0.42..5.29 rows=1 width=157) (actual rows= loops=)

  • Index Cond: (sid = (vpoitem.item_sid)::bpchar)
  • Filter: is_latest
53. 0.000 0.000 ↓ 0.0

Index Scan using hcl_entry_pk on hcl_entry hcl2 (cost=0.41..5.23 rows=1 width=72) (actual rows= loops=)

  • Index Cond: (sid = (item.product_category)::bpchar)
54. 0.000 0.000 ↓ 0.0

Index Scan using hcl_entry_pk on hcl_entry hcl5 (cost=0.41..5.86 rows=1 width=33) (actual rows= loops=)

  • Index Cond: (sid = (vpo.product_category)::bpchar)
  • Filter: (split_part((full_lineage_name)::text, '/'::text, 2) = 'Hardline'::text)
55. 0.000 0.000 ↓ 0.0

Index Scan using cpm_task_doc_sid_idx on cpm_task cpmtask (cost=0.56..9,377.53 rows=21 width=113) (actual rows= loops=)

  • Index Cond: (cpm_doc_sid = cpmdoc.sid)
  • Filter: (is_latest AND (SubPlan 1))
56.          

SubPlan (forIndex Scan)

57. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.56..274.08 rows=1 width=72) (actual rows= loops=)

  • Group Key: b.ref_doc_id, b.task_sid
58. 0.000 0.000 ↓ 0.0

Index Scan using cpm_task_doc_sid_idx on cpm_task b (cost=0.56..274.06 rows=1 width=45) (actual rows= loops=)

  • Index Cond: (cpmtask.cpm_doc_sid = cpm_doc_sid)
  • Filter: (is_latest AND (cpmtask.ref_doc_id = ref_doc_id) AND ((cpmtask.task_sid)::text = (task_sid)::text))