explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rA5p

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

Nested Loop Left Join (cost=3.92..6.40 rows=1 width=2,726) (actual time=0.076..0.077 rows=1 loops=1)

  • Join Filter: (u.id = accars.userid)
2.          

CTE cte_accounts

3. 0.038 0.038 ↑ 1.0 1 1

Index Scan using accountsid on accounts (cost=0.43..2.65 rows=1 width=92) (actual time=0.037..0.038 rows=1 loops=1)

  • Index Cond: ((id)::text = '43'::text)
4. 0.001 0.071 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.27..3.72 rows=1 width=1,938) (actual time=0.070..0.071 rows=1 loops=1)

5. 0.002 0.062 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.85..3.18 rows=1 width=1,351) (actual time=0.062..0.062 rows=1 loops=1)

6. 0.002 0.052 ↑ 1.0 1 1

Nested Loop (cost=0.42..2.67 rows=1 width=977) (actual time=0.052..0.052 rows=1 loops=1)

7. 0.042 0.042 ↑ 1.0 1 1

CTE Scan on cte_accounts accusd (cost=0.00..0.02 rows=1 width=804) (actual time=0.042..0.042 rows=1 loops=1)

  • Filter: (currency = 1)
8. 0.008 0.008 ↑ 1.0 1 1

Index Scan using users_pkey on users u (cost=0.42..2.64 rows=1 width=189) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (id = accusd.userid)
9. 0.008 0.008 ↑ 1.0 1 1

Index Scan using persons_pkey on persons p (cost=0.42..0.49 rows=1 width=390) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (u.id = userid)
10. 0.008 0.008 ↑ 1.0 1 1

Index Scan using addresses_pkey on addresses a (cost=0.42..0.53 rows=1 width=619) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: (p.mainaddressid = id)
11. 0.002 0.002 ↓ 0.0 0 1

CTE Scan on cte_accounts accars (cost=0.00..0.02 rows=1 width=804) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (currency = 0)
  • Rows Removed by Filter: 1
Planning time : 1.197 ms
Execution time : 0.403 ms