explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mxDC

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 5,944.051 ↑ 13.8 49 1

Finalize GroupAggregate (cost=2,976,915.99..2,979,071.00 rows=677 width=37) (actual time=5,856.105..5,944.051 rows=49 loops=1)

  • Group Key: t.account_id
2. 0.000 5,946.756 ↑ 27.6 49 1

Gather Merge (cost=2,976,915.99..2,979,052.39 rows=1,354 width=37) (actual time=5,856.089..5,946.756 rows=49 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 58.113 17,635.917 ↑ 42.3 16 3

Partial GroupAggregate (cost=2,975,915.97..2,977,896.08 rows=677 width=37) (actual time=5,849.110..5,878.639 rows=16 loops=3)

  • Group Key: t.account_id
4. 158.316 17,577.804 ↑ 2.2 118,676 3

Sort (cost=2,975,915.97..2,976,573.18 rows=262,886 width=11) (actual time=5,848.799..5,859.268 rows=118,676 loops=3)

  • Sort Key: t.account_id
  • Sort Method: quicksort Memory: 457kB
5. 66.499 17,419.488 ↑ 2.2 118,676 3

Nested Loop (cost=0.70..2,947,756.87 rows=262,886 width=11) (actual time=489.313..5,806.496 rows=118,676 loops=3)

6. 8,886.132 8,886.132 ↑ 1.6 22 3

Parallel Seq Scan on accounts a (cost=0.00..1,157,937.45 rows=35 width=14) (actual time=488.676..2,962.044 rows=22 loops=3)

  • Filter: ((account_type_id >= '10'::numeric) AND (account_type_id <= '14'::numeric) AND (company_id = '1351589930'::numeric))
  • Rows Removed by Filter: 13021505
7. 8,466.857 8,466.857 ↓ 2.9 5,314 67

Index Scan using txdetails_account_date on transactiondetails t (cost=0.70..51,119.54 rows=1,816 width=20) (actual time=33.808..126.371 rows=5,314 loops=67)

  • Index Cond: ((company_id = '1351589930'::numeric) AND (account_id = a.account_id) AND (account_id IS NOT NULL))
Planning time : 0.321 ms
Execution time : 5,946.882 ms