explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IvHj

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.095 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.92..6.43 rows=1 width=2,726) (actual time=0.094..0.095 rows=1 loops=1)

  • Join Filter: (u.id = accusd.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.000 0.090 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.27..3.75 rows=1 width=1,938) (actual time=0.089..0.090 rows=1 loops=1)

  • Join Filter: (u.id = accars.userid)
5. 0.001 0.086 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.27..3.72 rows=1 width=1,150) (actual time=0.085..0.086 rows=1 loops=1)

6. 0.002 0.077 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.85..3.18 rows=1 width=563) (actual time=0.076..0.077 rows=1 loops=1)

7. 0.001 0.066 ↑ 1.0 1 1

Nested Loop (cost=0.42..2.67 rows=1 width=189) (actual time=0.066..0.066 rows=1 loops=1)

8. 0.040 0.040 ↑ 1.0 1 1

CTE Scan on cte_accounts cte (cost=0.00..0.02 rows=1 width=16) (actual time=0.040..0.040 rows=1 loops=1)

9. 0.025 0.025 ↑ 1.0 1 1

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

  • Index Cond: (id = cte.userid)
10. 0.009 0.009 ↑ 1.0 1 1

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

  • Index Cond: (u.id = userid)
11. 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)
12. 0.004 0.004 ↓ 0.0 0 1

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

  • Filter: (currency = 0)
  • Rows Removed by Filter: 1
13. 0.000 0.000 ↑ 1.0 1 1

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

  • Filter: (currency = 1)
Planning time : 1.288 ms
Execution time : 0.368 ms