explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ifNE

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 16.027 ↑ 1.0 20 1

Limit (cost=4.54..52.82 rows=20 width=1,292) (actual time=15.256..16.027 rows=20 loops=1)

2. 14.606 16.019 ↑ 36,146.8 21 1

Nested Loop Left Join (cost=2.13..1,832,369.50 rows=759,083 width=1,292) (actual time=15.147..16.019 rows=21 loops=1)

3. 0.024 1.287 ↑ 36,146.8 21 1

Nested Loop (cost=1.71..1,421,092.33 rows=759,083 width=705) (actual time=0.545..1.287 rows=21 loops=1)

4. 0.053 0.763 ↑ 15,150.2 50 1

Nested Loop Left Join (cost=1.28..840,731.45 rows=757,512 width=331) (actual time=0.319..0.763 rows=50 loops=1)

5. 0.026 0.660 ↑ 15,150.2 50 1

Nested Loop Left Join (cost=0.85..440,985.81 rows=757,512 width=260) (actual time=0.313..0.660 rows=50 loops=1)

6. 0.084 0.084 ↑ 15,150.2 50 1

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

7. 0.550 0.550 ↓ 0.0 0 50

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

  • Index Cond: ((u.id = userid) AND (currency = 0))
8. 0.050 0.050 ↓ 0.0 0 50

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

  • Index Cond: ((u.id = userid) AND (currency = 1))
9. 0.500 0.500 ↓ 0.0 0 50

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

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

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

  • Index Cond: (p.mainaddressid = id)
Planning time : 7.380 ms
Execution time : 16.300 ms