explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m8Yb

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 34,005.840 ↑ 21.4 14 1

Limit (cost=1.02..3,119.88 rows=300 width=278) (actual time=445.710..34,005.840 rows=14 loops=1)

  • Output: r.id, c.id, c.terminal, c.client_fio, c.client_id, 3, c.amount, r.amount, c.ins_date, c.pan, c.pay_cnt, p.client_descr, p.client_descr, p.program_id, ((p.value * '100'::numeric)), (date_part('day'::text, c.ins_date))
  • Buffers: shared hit=484,041 read=80,280 dirtied=31
  • I/O Timings: read=32,951.525
2. 0.340 34,005.821 ↑ 319.2 14 1

Nested Loop (cost=1.02..46,461.65 rows=4,469 width=278) (actual time=445.708..34,005.821 rows=14 loops=1)

  • Output: r.id, c.id, c.terminal, c.client_fio, c.client_id, 3, c.amount, r.amount, c.ins_date, c.pan, c.pay_cnt, p.client_descr, p.client_descr, p.program_id, (p.value * '100'::numeric), date_part('day'::text, c.ins_date)
  • Join Filter: (c.program_id = p.program_id)
  • Rows Removed by Join Filter: 392
  • Buffers: shared hit=484,041 read=80,280 dirtied=31
  • I/O Timings: read=32,951.525
3. 171.431 34,005.215 ↑ 319.2 14 1

Nested Loop (cost=1.02..46,000.01 rows=4,469 width=126) (actual time=445.657..34,005.215 rows=14 loops=1)

  • Output: c.id, c.terminal, c.client_fio, c.client_id, c.amount, c.ins_date, c.pan, c.pay_cnt, c.program_id, r.id, r.amount
  • Inner Unique: true
  • Buffers: shared hit=484,013 read=80,280 dirtied=31
  • I/O Timings: read=32,951.525
4. 20,765.352 20,765.352 ↓ 1.4 121,004 1

Index Scan using idx_type_payment_date on public."RegPayments" r (cost=0.58..4,670.56 rows=87,228 width=22) (actual time=229.937..20,765.352 rows=121,004 loops=1)

  • Output: r.id, r.contract_id, r.payment_date, r.amount, r.type, r.ins_date, r.process_status, r.process_date, r.packno, r.file_name, r.calendar_status, r.process_guid, r.fee, r.comment, r.comiss_service, r.comis
  • Index Cond: ((r.type = ANY ('{0,102}'::integer[])) AND (r.payment_date <= (CURRENT_DATE + '3 days'::interval)) AND (r.payment_date >= CURRENT_DATE) AND (r.process_status = 0))
  • Filter: (r.calendar_status = 0)
  • Rows Removed by Filter: 103,290
  • Buffers: shared hit=19,392 read=60,203 dirtied=29
  • I/O Timings: read=20,313.689
5. 13,068.432 13,068.432 ↓ 0.0 0 121,004

Index Scan using contracts_pkey on public."Contracts" c (cost=0.44..0.47 rows=1 width=112) (actual time=0.108..0.108 rows=0 loops=121,004)

  • Output: c.id, c.terminal, c.pan, c.client_id, c.client_fio, c.client_passport, c.credit_info_status, c.amount, c.first_pay_amount, c.pay_cnt, c.part_amount, c.acq_fee, c.stan, c.rrn, c.authno, c.iso_pay_resp, c
  • Index Cond: (c.id = r.contract_id)
  • Filter: (c.status = ANY ('{1,5}'::integer[]))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=464,621 read=20,077 dirtied=2
  • I/O Timings: read=12,637.836
6. 0.266 0.266 ↑ 1.0 29 14

Seq Scan on public."DICPartPayProgramID" p (cost=0.00..0.02 rows=29 width=62) (actual time=0.002..0.019 rows=29 loops=14)

  • Output: p.program_id, p.code, p.descr, p.value, p.client_descr, p.merchant_mask, p.is_acq_fee, p.first_pay_amount, p.warm, p.early_repay_cnt, p.grace_period, p.early_pay_is_available, p.virtual_terminal, p.scheme_typ
  • Buffers: shared hit=28