explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yLe

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

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

2. 0.001 64.633 ↓ 0.0 0 1

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

3. 0.015 64.632 ↓ 0.0 0 1

Sort (cost=45,432.92..45,432.93 rows=1 width=65) (actual time=64.632..64.632 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.617 ↓ 0.0 0 1

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

  • Filter: (uc2.contactid IS NULL)
5. 0.000 64.617 ↓ 0.0 0 1

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

6. 53.793 53.793 ↑ 1.2 311 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=53.037..53.793 rows=311 loops=1)

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

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

  • 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 : 2.006 ms
Execution time : 64.679 ms