explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IBPCv

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

Finalize GroupAggregate (cost=3,243,731.27..3,249,072.31 rows=37,280 width=61) (actual time=3,262.030..3,262.030 rows=0 loops=1)

  • Group Key: t.item_id, (date_part('day'::text, c.cash_date)), (date_part('month'::text, c.cash_date)), (date_part('year'::text, c.cash_date))
2. 9.388 3,265.704 ↓ 0.0 0 1

Gather Merge (cost=3,243,731.27..3,247,860.72 rows=31,066 width=61) (actual time=3,262.029..3,265.704 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.002 3,256.316 ↓ 0.0 0 3 / 3

Partial GroupAggregate (cost=3,242,731.25..3,243,274.90 rows=15,533 width=61) (actual time=3,256.315..3,256.316 rows=0 loops=3)

  • Group Key: t.item_id, (date_part('day'::text, c.cash_date)), (date_part('month'::text, c.cash_date)), (date_part('year'::text, c.cash_date))
4. 0.028 3,256.314 ↓ 0.0 0 3 / 3

Sort (cost=3,242,731.25..3,242,770.08 rows=15,533 width=35) (actual time=3,256.314..3,256.314 rows=0 loops=3)

  • Sort Key: t.item_id, (date_part('day'::text, c.cash_date)), (date_part('month'::text, c.cash_date)), (date_part('year'::text, c.cash_date))
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
5. 0.001 3,256.286 ↓ 0.0 0 3 / 3

Nested Loop (cost=347.43..3,241,649.92 rows=15,533 width=35) (actual time=3,256.286..3,256.286 rows=0 loops=3)

6. 0.001 3,256.285 ↓ 0.0 0 3 / 3

Hash Join (cost=346.73..3,238,442.59 rows=1,053 width=32) (actual time=3,256.285..3,256.285 rows=0 loops=3)

  • Hash Cond: (c.account_id = a.account_id)
7. 0.001 3,256.284 ↓ 0.0 0 3 / 3

Parallel Append (cost=0.70..3,238,073.66 rows=8,608 width=37) (actual time=3,256.284..3,256.284 rows=0 loops=3)

8. 3,256.283 3,256.283 ↓ 0.0 0 3 / 3

Parallel Index Scan using cashbasis_p1_pkey on cashbasis_p1 c (cost=0.70..3,238,030.62 rows=8,608 width=37) (actual time=3,256.282..3,256.283 rows=0 loops=3)

  • Index Cond: (company_id = '109287618'::numeric)
  • Filter: ((cash_date >= '2019-01-01 00:00:00'::timestamp without time zone) AND (cash_date <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 1529103
9. 0.000 0.000 ↓ 0.0 0 / 3

Hash (cost=345.48..345.48 rows=44 width=13) (never executed)

10. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using accounts_pk on accounts a (cost=0.56..345.48 rows=44 width=13) (never executed)

  • Index Cond: (company_id = '109287618'::numeric)
  • Filter: (account_type_id = '10'::numeric)
11. 0.000 0.000 ↓ 0.0 0 / 3

Append (cost=0.70..2.93 rows=1 width=23) (never executed)

12. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using txdetails_p1_pkey on txdetails_p1 t (cost=0.70..2.92 rows=1 width=23) (never executed)

  • Index Cond: ((company_id = '109287618'::numeric) AND (tx_id = c.tx_id) AND (sequence = c.sequence))
  • Filter: (is_no_post IS NULL)
Planning time : 7.789 ms
Execution time : 3,265.847 ms