explain.depesz.com

PostgreSQL's explain analyze made readable

Result: krb8

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 40,912.926 ↑ 140.0 1 1

HashAggregate (cost=403,608.02..403,609.42 rows=140 width=524) (actual time=40,912.925..40,912.926 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=56,506 read=136,494 written=14,489
2.          

Initplan (for HashAggregate)

3. 0.000 0.000 ↓ 0.0 0

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

  • Output: lkup_payment_types.payment_type_id
  • Filter: ((lkup_payment_types.name)::text = 'Unknown'::text)
4. 1,804.950 40,912.910 ↑ 1,200,501.8 5 1

Hash Join (cost=13.59..388,589.99 rows=6,002,509 width=520) (actual time=6,382.015..40,912.910 rows=5 loops=1)

  • Output: p.payment_type_id, p.name
  • Hash Cond: ((e.payment_type)::text = (p.name)::text)
  • Buffers: shared hit=56,506 read=136,494 written=14,489
5. 39,107.445 39,107.445 ↑ 1.0 5,923,372 1

Index Scan using "index_etl.payments_on_etl_batch_file_id" on etl.payments e (cost=0.44..306,042.35 rows=6,002,509 width=21) (actual time=1.967..39,107.445 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=56,506 read=136,493 written=14,489
6. 0.015 0.515 ↑ 5.4 26 1

Hash (cost=11.40..11.40 rows=140 width=520) (actual time=0.515..0.515 rows=26 loops=1)

  • Output: p.payment_type_id, p.name
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared read=1
7. 0.500 0.500 ↑ 5.4 26 1

Seq Scan on scv.lkup_payment_types p (cost=0.00..11.40 rows=140 width=520) (actual time=0.497..0.500 rows=26 loops=1)

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