explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LOKN

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 7,512.869 ↑ 1.0 20 1

Limit (cost=2,305.99..48,383.11 rows=20 width=1,292) (actual time=468.829..7,512.869 rows=20 loops=1)

2. 0.078 7,512.856 ↑ 12.9 21 1

Nested Loop Left Join (cost=2.13..622,043.30 rows=270 width=1,292) (actual time=190.754..7,512.856 rows=21 loops=1)

3. 0.089 7,512.715 ↑ 12.9 21 1

Nested Loop Left Join (cost=1.70..621,900.14 rows=270 width=1,221) (actual time=190.744..7,512.715 rows=21 loops=1)

4. 0.075 7,512.437 ↑ 12.9 21 1

Nested Loop Left Join (cost=1.27..621,757.66 rows=270 width=1,150) (actual time=190.709..7,512.437 rows=21 loops=1)

5. 65.231 7,512.173 ↑ 12.9 21 1

Nested Loop (cost=0.85..621,612.05 rows=270 width=563) (actual time=190.697..7,512.173 rows=21 loops=1)

6. 627.084 627.084 ↓ 1.0 757,762 1

Index Scan Backward using usersiid on users u (cost=0.42..41,240.17 rows=757,512 width=189) (actual time=0.015..627.084 rows=757,762 loops=1)

7. 6,819.858 6,819.858 ↓ 0.0 0 757,762

Index Scan using persons_pkey on persons p (cost=0.42..0.76 rows=1 width=390) (actual time=0.009..0.009 rows=0 loops=757,762)

  • Index Cond: (userid = u.id)
  • Filter: (((firstname)::text <> ''::text) AND ((full_name((firstname)::text, (lastname)::text) ~~* '%Diegoz%'::text) OR ((dni)::text ~~ '%Diegoz%'::text) OR ((u.btclientnumber)::text ~~ '%Diegoz%'::text) OR ((emailaddress)::text ~~* '%Diegoz%'::text)))
  • Rows Removed by Filter: 1
8. 0.189 0.189 ↑ 1.0 1 21

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

  • Index Cond: (p.mainaddressid = id)
9. 0.189 0.189 ↑ 1.0 1 21

Index Scan using infra_accounts_userid_currency on accounts accars (cost=0.43..0.52 rows=1 width=87) (actual time=0.009..0.009 rows=1 loops=21)

  • Index Cond: ((u.id = userid) AND (currency = 0))
10. 0.063 0.063 ↑ 1.0 1 21

Index Scan using infra_accounts_userid_currency on accounts accusd (cost=0.43..0.52 rows=1 width=87) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: ((u.id = userid) AND (currency = 1))
Planning time : 1.927 ms
Execution time : 7,513.106 ms