explain.depesz.com

PostgreSQL's explain analyze made readable

Result: REm

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

Hash Left Join (cost=2,653,765.36..2,334,407,217.71 rows=30,141 width=178) (actual rows= loops=)

  • Hash Cond: (ptx.store_id = s.store_id)
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,653,764.34..2,714,112.75 rows=30,141 width=176) (actual rows= loops=)

  • Hash Cond: ((pt.product_id)::text = (pr.plu_id)::text)
3. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=2,612,542.30..2,667,811.89 rows=30,141 width=173) (actual rows= loops=)

  • Hash Cond: (((ppi.pos_txn_id)::text = (pt.pos_txn_id)::text) AND ((ppi.product_id)::text = (pt.product_id)::text))
4. 0.000 0.000 ↓ 0.0

Seq Scan on pos_promotion_item ppi (cost=0.00..26,304.41 rows=792,341 width=38) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=2,611,354.19..2,611,354.19 rows=30,141 width=171) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Join (cost=309.34..2,611,354.19 rows=30,141 width=171) (actual rows= loops=)

  • Hash Cond: ((pt.pos_txn_id)::text = (ptx.id)::text)
7. 0.000 0.000 ↓ 0.0

Seq Scan on pos_tx_item pt (cost=0.00..2,355,620.27 rows=40,819,707 width=116) (actual rows= loops=)

  • Filter: ((category_id)::text <> 'DEPTSTORE'::text)
8. 0.000 0.000 ↓ 0.0

Hash (cost=271.37..271.37 rows=3,037 width=55) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using idx_tx_saldat on pos_transaction ptx (cost=0.43..271.37 rows=3,037 width=55) (actual rows= loops=)

  • Index Cond: (sales_date = to_date('20200302'::text, 'YYYYMMDD'::text))
  • Filter: ((status)::text = 'COMPLETED'::text)
10. 0.000 0.000 ↓ 0.0

Hash (cost=33,412.46..33,412.46 rows=384,446 width=39) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on product pr (cost=0.00..33,412.46 rows=384,446 width=39) (actual rows= loops=)

  • Filter: (sku IS NOT NULL)
12. 0.000 0.000 ↓ 0.0

Hash (cost=1.01..1.01 rows=1 width=10) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on store s (cost=0.00..1.01 rows=1 width=10) (actual rows= loops=)

14.          

SubPlan (for Hash Left Join)

15. 0.000 0.000 ↓ 0.0

Limit (cost=77,359.46..77,359.47 rows=1 width=16) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

HashAggregate (cost=77,359.46..77,359.47 rows=1 width=16) (actual rows= loops=)

  • Group Key: substr((electronic_fund_transfer.card_num)::text, 1, 6)
17. 0.000 0.000 ↓ 0.0

Seq Scan on electronic_fund_transfer (cost=0.00..77,359.45 rows=1 width=16) (actual rows= loops=)

  • Filter: ((transaction_id)::text = (ptx.id)::text)