explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sxan

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 43,110.464 ↑ 26.0 1 1

HashAggregate (cost=408,829.28..408,829.54 rows=26 width=20) (actual time=43,110.463..43,110.464 rows=1 loops=1)

  • Output: COALESCE(p.payment_type_id, $0), p.name, p.payment_type_id
  • Group Key: p.payment_type_id
  • Buffers: shared hit=56506 read=136494 written=8119
2.          

Initplan (for HashAggregate)

3. 0.000 0.000 ↓ 0.0 0

Seq Scan on scv.lkup_payment_types (cost=0.00..1.32 rows=1 width=4) (never executed)

  • Output: lkup_payment_types.payment_type_id
  • Filter: ((lkup_payment_types.name)::text = 'Unknown'::text)
4. 1,893.771 43,110.448 ↑ 1,193,799.6 5 1

Hash Join (cost=2.02..393,905.46 rows=5,968,998 width=16) (actual time=12,519.710..43,110.448 rows=5 loops=1)

  • Output: p.payment_type_id, p.name
  • Hash Cond: ((e.payment_type)::text = (p.name)::text)
  • Buffers: shared hit=56506 read=136494 written=8119
5. 41,216.078 41,216.078 ↑ 1.0 5,923,372 1

Index Scan using "index_etl.payments_on_etl_batch_file_id" on etl.payments e (cost=0.44..304,368.90 rows=5,968,998 width=21) (actual time=1.715..41,216.078 rows=5,923,372 loops=1)

  • Output: e.id, e.sale_id, e.ticketno, e.transaction_date, e.payment_type, e.payment_value, e.currency_type, e.card_type_code, e.card_description, e.entry_mode, e.etl_batch_file_id, e.imported, e.created_at, e.updated_at, e.customer_id
  • Index Cond: (e.etl_batch_file_id = 444)
  • Buffers: shared hit=56506 read=136493 written=8119
6. 0.026 0.599 ↑ 1.0 26 1

Hash (cost=1.26..1.26 rows=26 width=16) (actual time=0.599..0.599 rows=26 loops=1)

  • Output: p.payment_type_id, p.name
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared read=1
7. 0.573 0.573 ↑ 1.0 26 1

Seq Scan on scv.lkup_payment_types p (cost=0.00..1.26 rows=26 width=16) (actual time=0.568..0.573 rows=26 loops=1)

  • Output: p.payment_type_id, p.name
  • Buffers: shared read=1