explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VWhF

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 3,349.615 ↓ 0.0 0 1

Group (cost=194,356.86..194,364.33 rows=35 width=4) (actual time=3,349.614..3,349.615 rows=0 loops=1)

  • Group Key: arp.cid
2. 42.585 3,384.897 ↓ 0.0 0 1

Gather Merge (cost=194,356.86..194,364.26 rows=30 width=4) (actual time=3,349.614..3,384.897 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.001 3,342.312 ↓ 0.0 0 3 / 3

Group (cost=193,356.84..193,360.77 rows=15 width=4) (actual time=3,342.312..3,342.312 rows=0 loops=3)

  • Group Key: arp.cid
4. 0.018 3,342.311 ↓ 0.0 0 3 / 3

Merge Join (cost=193,356.84..193,360.73 rows=15 width=4) (actual time=3,342.311..3,342.311 rows=0 loops=3)

  • Merge Cond: (arp.cid = c.id)
5. 0.026 3,339.310 ↑ 45.5 2 3 / 3

Sort (cost=193,197.73..193,197.96 rows=91 width=4) (actual time=3,339.309..3,339.310 rows=2 loops=3)

  • Sort Key: arp.cid
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
6. 3,339.284 3,339.284 ↑ 45.5 2 3 / 3

Parallel Seq Scan on ar_payments arp (cost=0.00..193,194.77 rows=91 width=4) (actual time=3,339.281..3,339.284 rows=2 loops=3)

  • Filter: ((payment_type_id = ANY ('{4,9}'::integer[])) AND (payment_amount > '0'::numeric) AND (payment_status_type_id = 10) AND (captured_on >= date_trunc('day'::text, now())))
  • Rows Removed by Filter: 1,503,821
7. 0.137 2.983 ↑ 2.0 341 2 / 3

Sort (cost=159.08..160.74 rows=667 width=4) (actual time=4.450..4.475 rows=341 loops=2)

  • Sort Key: c.id
  • Sort Method: quicksort Memory: 56kB
  • Worker 1: Sort Method: quicksort Memory: 56kB
8. 2.360 2.846 ↓ 1.0 671 2 / 3

Bitmap Heap Scan on clients c (cost=17.45..127.79 rows=667 width=4) (actual time=1.031..4.269 rows=671 loops=2)

  • Recheck Cond: (company_status_type_id = 4)
  • Heap Blocks: exact=76
9. 0.486 0.486 ↓ 1.0 676 2 / 3

Bitmap Index Scan on clients_idx_clients_company_status_ty (cost=0.00..17.28 rows=667 width=0) (actual time=0.729..0.729 rows=676 loops=2)

  • Index Cond: (company_status_type_id = 4)
Planning time : 16.509 ms
Execution time : 3,385.025 ms