explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ORR9

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1.574 ↓ 0.0 0 1

Nested Loop (cost=37.72..24,269.97 rows=20 width=1,713) (actual time=1.574..1.574 rows=0 loops=1)

2. 0.000 1.573 ↓ 0.0 0 1

Nested Loop (cost=37.30..24,258.83 rows=20 width=1,693) (actual time=1.573..1.573 rows=0 loops=1)

3. 0.001 1.573 ↓ 0.0 0 1

Nested Loop (cost=36.86..24,246.86 rows=20 width=1,709) (actual time=1.573..1.573 rows=0 loops=1)

4. 0.000 1.572 ↓ 0.0 0 1

Nested Loop (cost=36.44..24,236.24 rows=20 width=1,680) (actual time=1.572..1.572 rows=0 loops=1)

5. 0.000 1.572 ↓ 0.0 0 1

Nested Loop (cost=36.00..24,224.27 rows=20 width=1,634) (actual time=1.572..1.572 rows=0 loops=1)

6. 0.002 1.572 ↓ 0.0 0 1

Nested Loop (cost=35.57..24,214.20 rows=20 width=36) (actual time=1.572..1.572 rows=0 loops=1)

7. 1.521 1.521 ↑ 1.1 7 1

Index Scan using accounts_user_id_type_currency on accounts a (cost=0.55..28.67 rows=8 width=16) (actual time=1.518..1.521 rows=7 loops=1)

  • Index Cond: (user_id = '59400732b559ca671e83cc2e '::bpchar)
8. 0.007 0.049 ↓ 0.0 0 7

Bitmap Heap Scan on lines l (cost=35.02..3,014.85 rows=834 width=52) (actual time=0.007..0.007 rows=0 loops=7)

  • Recheck Cond: (account = a.id)
9. 0.042 0.042 ↓ 0.0 0 7

Bitmap Index Scan on lines_account_created (cost=0.00..34.81 rows=834 width=0) (actual time=0.006..0.006 rows=0 loops=7)

  • Index Cond: (account = a.id)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using transactions_pkey on transactions t (cost=0.43..0.49 rows=1 width=1,598) (never executed)

  • Index Cond: (id = l.transaction)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using lines_transaction on lines credit_l (cost=0.43..0.58 rows=2 width=46) (never executed)

  • Index Cond: (transaction = l.transaction)
  • Filter: ((type)::text = 'CREDIT'::text)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using accounts_pkey on accounts credit_a (cost=0.43..0.52 rows=1 width=61) (never executed)

  • Index Cond: (id = credit_l.account)
13. 0.000 0.000 ↓ 0.0 0

Index Scan using lines_transaction on lines debit_l (cost=0.43..0.58 rows=2 width=32) (never executed)

  • Index Cond: (transaction = l.transaction)
  • Filter: ((type)::text = 'DEBIT'::text)
14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using accounts_pkey on accounts debit_a (cost=0.43..0.52 rows=1 width=16) (never executed)

  • Index Cond: (id = debit_l.account)
  • Heap Fetches: 0
Planning time : 3.892 ms
Execution time : 1.712 ms