explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Vp1

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 5.700 ↑ 1.0 1 1

Sort (cost=2,104.35..2,104.35 rows=1 width=64) (actual time=5.700..5.700 rows=1 loops=1)

  • Sort Key: (((1))::character varying)
  • Sort Method: quicksort Memory: 25kB
2. 0.004 5.696 ↑ 1.0 1 1

Nested Loop Left Join (cost=2,104.26..2,104.34 rows=1 width=64) (actual time=5.695..5.696 rows=1 loops=1)

  • Join Filter: (t.klass_id = ((1))::numeric)
3. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

4. 0.000 5.691 ↓ 0.0 0 1

GroupAggregate (cost=2,104.26..2,104.29 rows=1 width=40) (actual time=5.691..5.691 rows=0 loops=1)

  • Group Key: t.klass_id
5. 0.003 5.691 ↓ 0.0 0 1

Sort (cost=2,104.26..2,104.27 rows=1 width=14) (actual time=5.690..5.691 rows=0 loops=1)

  • Sort Key: t.klass_id
  • Sort Method: quicksort Memory: 25kB
6. 0.000 5.688 ↓ 0.0 0 1

Nested Loop (cost=2.00..2,104.25 rows=1 width=14) (actual time=5.688..5.688 rows=0 loops=1)

7. 0.000 5.688 ↓ 0.0 0 1

Nested Loop (cost=1.44..2,101.34 rows=1 width=27) (actual time=5.688..5.688 rows=0 loops=1)

8. 0.003 5.688 ↓ 0.0 0 1

Nested Loop (cost=0.74..2,098.40 rows=1 width=26) (actual time=5.688..5.688 rows=0 loops=1)

9. 0.003 0.009 ↑ 1.0 2 1

Unique (cost=0.04..0.04 rows=2 width=4) (actual time=0.006..0.009 rows=2 loops=1)

10. 0.004 0.006 ↑ 1.0 2 1

Sort (cost=0.04..0.04 rows=2 width=4) (actual time=0.006..0.006 rows=2 loops=1)

  • Sort Key: (("*VALUES*".column1)::numeric)
  • Sort Method: quicksort Memory: 25kB
11. 0.002 0.002 ↑ 1.0 2 1

Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=4) (actual time=0.002..0.002 rows=2 loops=1)

12. 0.002 5.676 ↓ 0.0 0 2

Append (cost=0.70..1,049.17 rows=1 width=26) (actual time=2.838..2.838 rows=0 loops=2)

13. 5.674 5.674 ↓ 0.0 0 2

Index Only Scan using txdetails_p9_covered on txdetails_p9 t (cost=0.70..1,049.16 rows=1 width=26) (actual time=2.837..2.837 rows=0 loops=2)

  • Index Cond: ((company_id = '155935959'::numeric) AND (is_no_post IS NULL) AND (klass_id = ("*VALUES*".column1)::numeric))
  • Heap Fetches: 0
14. 0.000 0.000 ↓ 0.0 0

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

15. 0.000 0.000 ↓ 0.0 0

Index Scan using cashbasis_p9_pkey on cashbasis_p9 c (cost=0.70..2.92 rows=1 width=29) (never executed)

  • Index Cond: ((company_id = '155935959'::numeric) AND (tx_id = t.tx_id) AND (sequence = t.sequence))
  • Filter: ((cash_date >= '2019-01-01'::date) AND (cash_date <= '2019-12-31'::date))
16. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((company_id = '155935959'::numeric) AND (account_id = c.account_id))
  • Filter: (account_type_id = '10'::numeric)
Planning time : 21.245 ms
Execution time : 5.786 ms