explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tj7U

Settings
# exclusive inclusive rows x rows loops node
1. 19.259 72.079 ↓ 4.3 77,746 1

Nested Loop (cost=2.68..3,186.01 rows=18,074 width=37) (actual time=0.056..72.079 rows=77,746 loops=1)

2. 0.001 0.426 ↑ 1.0 1 1

Nested Loop (cost=1.55..12.58 rows=1 width=10) (actual time=0.041..0.426 rows=1 loops=1)

3. 0.359 0.417 ↑ 1.0 1 1

Hash Join (cost=1.12..4.14 rows=1 width=14) (actual time=0.032..0.417 rows=1 loops=1)

  • Hash Cond: (c.currency_id = au.currency_id)
4. 0.050 0.050 ↑ 1.0 159 1

Seq Scan on currency c (cost=0.00..2.59 rows=159 width=6) (actual time=0.004..0.050 rows=159 loops=1)

5. 0.002 0.008 ↑ 1.0 1 1

Hash (cost=1.10..1.10 rows=1 width=10) (actual time=0.008..0.008 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on api_users au (cost=0.00..1.10 rows=1 width=10) (actual time=0.005..0.006 rows=1 loops=1)

  • Filter: ((api_user_id = 4) AND (status = 'Y'::bpchar))
  • Rows Removed by Filter: 7
7. 0.008 0.008 ↑ 1.0 1 1

Index Only Scan using users_pkey on users u (cost=0.43..8.45 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (user_id = au.user_id)
  • Heap Fetches: 1
8. 24.279 52.394 ↓ 4.3 77,746 1

Hash Join (cost=1.14..2,992.68 rows=18,074 width=35) (actual time=0.013..52.394 rows=77,746 loops=1)

  • Hash Cond: (aats.api_token_id = at.api_token_id)
9. 28.111 28.111 ↑ 1.0 77,908 1

Seq Scan on api_ai_tr_statistics aats (cost=0.00..2,677.51 rows=81,335 width=31) (actual time=0.004..28.111 rows=77,908 loops=1)

  • Filter: ((req_date >= '2019-01-01 00:00:00+00'::timestamp with time zone) AND (req_date <= '2020-01-01 00:00:00+00'::timestamp with time zone))
  • Rows Removed by Filter: 32004
10. 0.001 0.004 ↑ 1.0 2 1

Hash (cost=1.11..1.11 rows=2 width=8) (actual time=0.004..0.004 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.003 0.003 ↑ 1.0 2 1

Seq Scan on api_tokens at (cost=0.00..1.11 rows=2 width=8) (actual time=0.002..0.003 rows=2 loops=1)

  • Filter: (api_user_id = 4)
  • Rows Removed by Filter: 8
Planning time : 0.514 ms
Execution time : 82.423 ms