explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wPeb

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 64.339 ↓ 0.0 0 1

Limit (cost=45,432.92..45,432.94 rows=1 width=65) (actual time=64.339..64.339 rows=0 loops=1)

2. 0.000 64.338 ↓ 0.0 0 1

Unique (cost=45,432.92..45,432.94 rows=1 width=65) (actual time=64.338..64.338 rows=0 loops=1)

3. 0.016 64.338 ↓ 0.0 0 1

Sort (cost=45,432.92..45,432.93 rows=1 width=65) (actual time=64.338..64.338 rows=0 loops=1)

  • Sort Key: mc.firstname, mc.middlename, mc.lastname, mc.titlename, mc.companyname
  • Sort Method: quicksort Memory: 25kB
4. 0.000 64.322 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.86..45,432.91 rows=1 width=65) (actual time=64.322..64.322 rows=0 loops=1)

  • Filter: (uc2.contactid IS NULL)
5. 0.044 64.322 ↓ 0.0 0 1

Nested Loop (cost=0.86..39,157.99 rows=1 width=65) (actual time=64.322..64.322 rows=0 loops=1)

6. 55.599 55.599 ↑ 1.4 263 1

Index Only Scan using idx_usercontact_contactid_createdat_desc_notrecomm_notdel on usercontact uc (cost=0.43..38,258.20 rows=361 width=8) (actual time=54.847..55.599 rows=263 loops=1)

  • Index Cond: (createdat > '2020-03-12 09:00:18.768+00'::timestamp with time zone)
  • Heap Fetches: 318
7. 8.679 8.679 ↓ 0.0 0 263

Index Scan using idx_mycontact_contactid on mycontact mc (cost=0.43..2.48 rows=1 width=65) (actual time=0.033..0.033 rows=0 loops=263)

  • Index Cond: (contactid = uc.contactid)
  • Filter: ((emailaicache IS NOT NULL) AND ((emailaicache #>> '{emails,0,"Email Server AI"}'::text[]) = 'valid'::text) AND ((lower(titlename) = 'ceo'::text) OR ((length(titlename) > 4) AND (titlename % 'ceo'::text)) OR (lower(titlename) = 'ceo, vp, manager, president'::text) OR ((length(titlename) > 4) AND (titlename % 'ceo, vp, manager, president'::text))))
  • Rows Removed by Filter: 1
8. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.99..6,274.90 rows=1 width=8) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.99..6,274.90 rows=1 width=8) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_usercontact_userid_contactid on usercontact uc2 (cost=0.56..161.10 rows=2,488 width=8) (never executed)

  • Index Cond: (userid = '47372'::bigint)
  • Heap Fetches: 0
11. 0.000 0.000 ↓ 0.0 0

Index Scan using mycontact_pkey on mycontact mc2 (cost=0.43..2.45 rows=1 width=8) (never executed)

  • Index Cond: (contactid = uc2.contactid)
  • Filter: ((firstname = mc.firstname) AND (companyname = mc.companyname) AND ((mc.lastname IS NULL) OR (lower(lastname) = lower(mc.lastname))))
Planning time : 1.860 ms
Execution time : 64.389 ms