explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uLui

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 26.511 ↓ 0.0 0 1

Limit (cost=1,947.29..1,947.29 rows=1 width=1,226) (actual time=26.511..26.511 rows=0 loops=1)

2. 0.006 26.511 ↓ 0.0 0 1

Sort (cost=1,947.28..1,947.29 rows=2 width=1,226) (actual time=26.511..26.511 rows=0 loops=1)

  • Sort Key: u.iid DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.001 26.505 ↓ 0.0 0 1

Nested Loop Left Join (cost=252.40..1,947.27 rows=2 width=1,226) (actual time=26.505..26.505 rows=0 loops=1)

4. 0.000 26.504 ↓ 0.0 0 1

Nested Loop Left Join (cost=252.12..1,827.27 rows=2 width=1,161) (actual time=26.504..26.504 rows=0 loops=1)

5. 0.001 26.504 ↓ 0.0 0 1

Nested Loop Left Join (cost=251.83..1,707.26 rows=2 width=1,096) (actual time=26.504..26.504 rows=0 loops=1)

6. 20.179 26.503 ↓ 0.0 0 1

Hash Join (cost=251.55..1,706.40 rows=2 width=506) (actual time=26.503..26.503 rows=0 loops=1)

  • Hash Cond: (u.id = p.userid)
  • Join Filter: ((full_name((p.firstname)::text, (p.lastname)::text) ~~* '%luca878s%'::text) OR ((p.dni)::text ~~ '%luca878s%'::text) OR ((u.btclientnumber)::text ~~ '%luca878s%'::text) OR ((p.emailaddress)::text ~~* '%luca878s%'::text))
  • Rows Removed by Join Filter: 4036
7. 1.558 1.558 ↓ 1.0 4,337 1

Seq Scan on users u (cost=0.00..276.08 rows=4,308 width=185) (actual time=0.008..1.558 rows=4,337 loops=1)

8. 2.404 4.766 ↑ 1.1 4,036 1

Hash (cost=197.29..197.29 rows=4,341 width=337) (actual time=4.766..4.766 rows=4,036 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1134kB
9. 2.362 2.362 ↑ 1.1 4,036 1

Seq Scan on persons p (cost=0.00..197.29 rows=4,341 width=337) (actual time=0.007..2.362 rows=4,036 loops=1)

  • Filter: ((firstname)::text <> ''::text)
  • Rows Removed by Filter: 300
10. 0.000 0.000 ↓ 0.0 0

Index Scan using addresses_pkey on addresses a (cost=0.28..0.42 rows=1 width=622) (never executed)

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

Index Scan using accounts_id_userid_key on accounts accars (cost=0.28..59.99 rows=1 width=81) (never executed)

  • Index Cond: (u.id = userid)
  • Filter: (currency = 0)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using accounts_id_userid_key on accounts accusd (cost=0.28..59.99 rows=1 width=81) (never executed)

  • Index Cond: (u.id = userid)
  • Filter: (currency = 1)
Planning time : 1.504 ms
Execution time : 26.660 ms