explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JGro

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

Sort (cost=5,411.03..5,412.31 rows=514 width=187) (actual rows= loops=)

  • Sort Key: (CASE WHEN (lower((p.name)::text) ~~ 'sta'::text) THEN 1 WHEN (lower((p.name)::text) ~~ 'sta%'::text) THEN 2 ELSE 3 END), p.name, (productattribute(s.m_attributesetinstance_id))
2. 0.000 0.000 ↓ 0.0

HashAggregate (cost=5,118.03..5,387.88 rows=514 width=187) (actual rows= loops=)

  • Group Key: p.m_product_id, a.created, a.serno, a.lot, a.guaranteedate, s.m_attributesetinstance_id, l.m_warehouse_id, mas.isserno, mas.islot, mas.isguaranteedate, mas.m_attributeset_id, p.c_uom_id, s.qtyreserved
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,200.65..5,100.04 rows=514 width=187) (actual rows= loops=)

  • Hash Cond: ((p.m_attributeset_id = a.m_attributeset_id) AND (s.m_attributesetinstance_id = a.m_attributesetinstance_id))
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,702.10..4,597.63 rows=514 width=151) (actual rows= loops=)

  • Hash Cond: (p.m_attributeset_id = mas.m_attributeset_id)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,700.87..4,594.45 rows=514 width=111) (actual rows= loops=)

  • Hash Cond: (p.m_product_id = s.m_product_id)
6. 0.000 0.000 ↓ 0.0

Seq Scan on m_product p (cost=0.00..2,882.65 rows=514 width=86) (actual rows= loops=)

  • Filter: ((ad_org_id = ANY ('{0,1000000}'::numeric[])) AND (isactive = 'Y'::bpchar) AND (issold = 'Y'::bpchar) AND (ad_client_id = '1000000'::numeric) AND (lower((name)::text) ~~ '%sta%'::text))
7. 0.000 0.000 ↓ 0.0

Hash (cost=1,700.68..1,700.68 rows=15 width=32) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..1,700.68 rows=15 width=32) (actual rows= loops=)

  • Join Filter: (l.m_locator_id = s.m_locator_id)
9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..2.38 rows=1 width=32) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on m_locator l (cost=0.00..1.19 rows=1 width=32) (actual rows= loops=)

  • Filter: (m_warehouse_id = '1000000'::numeric)
11. 0.000 0.000 ↓ 0.0

Seq Scan on m_warehouse w (cost=0.00..1.19 rows=1 width=16) (actual rows= loops=)

  • Filter: (m_warehouse_id = '1000000'::numeric)
12. 0.000 0.000 ↓ 0.0

Seq Scan on m_storage s (cost=0.00..1,695.55 rows=220 width=21) (actual rows= loops=)

  • Filter: ((qtyonhand > '0'::numeric) OR (COALESCE(m_attributesetinstance_id, '0'::numeric) = '0'::numeric))
13. 0.000 0.000 ↓ 0.0

Hash (cost=1.10..1.10 rows=10 width=40) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on m_attributeset mas (cost=0.00..1.10 rows=10 width=40) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=315.82..315.82 rows=12,182 width=48) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on m_attributesetinstance a (cost=0.00..315.82 rows=12,182 width=48) (actual rows= loops=)