explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6kTD

Settings
# exclusive inclusive rows x rows loops node
1. 0.160 54.178 ↑ 839.6 14 1

Sort (cost=94,820.24..94,849.62 rows=11,754 width=3,861) (actual time=54.176..54.178 rows=14 loops=1)

  • Sort Key: e1.first_name, e1.last_name
  • Sort Method: quicksort Memory: 53kB
2. 0.071 54.018 ↑ 839.6 14 1

Hash Join (cost=346.54..74,499.12 rows=11,754 width=3,861) (actual time=8.407..54.018 rows=14 loops=1)

  • Hash Cond: (q0.project_id = p2.id)
3. 0.533 50.719 ↑ 839.6 14 1

Nested Loop (cost=183.26..74,304.90 rows=11,754 width=3,119) (actual time=5.166..50.719 rows=14 loops=1)

4. 4.972 8.186 ↑ 92.8 150 1

Bitmap Heap Scan on expert_profiles e1 (cost=182.84..30,658.55 rows=13,919 width=987) (actual time=3.350..8.186 rows=150 loops=1)

  • Recheck Cond: ((email ~~* '%500%'::text) OR (f_unaccent(((btrim(first_name) || ' '::text) || btrim(last_name))) ~~* '%500%'::text) OR (regexp_replace((phone)::text, '[^0-9+]+'::text, ''::text, 'g'::text) ~~* '%500%'::text))
  • Heap Blocks: exact=146
5. 0.004 3.214 ↓ 0.0 0 1

BitmapOr (cost=182.84..182.84 rows=13,920 width=0) (actual time=3.214..3.214 rows=0 loops=1)

6. 1.865 1.865 ↓ 1.5 3 1

Bitmap Index Scan on expert_profiles_email_trgm_index (cost=0.00..16.01 rows=2 width=0) (actual time=1.865..1.865 rows=3 loops=1)

  • Index Cond: (email ~~* '%500%'::text)
7. 1.295 1.295 ↓ 0.0 0 1

Bitmap Index Scan on expert_profiles_unaccent_full_name_index (cost=0.00..20.26 rows=35 width=0) (actual time=1.295..1.295 rows=0 loops=1)

  • Index Cond: (f_unaccent(((btrim(first_name) || ' '::text) || btrim(last_name))) ~~* '%500%'::text)
8. 0.050 0.050 ↑ 94.4 147 1

Bitmap Index Scan on expert_profiles_phone_trgm_index (cost=0.00..136.13 rows=13,884 width=0) (actual time=0.050..0.050 rows=147 loops=1)

  • Index Cond: (regexp_replace((phone)::text, '[^0-9+]+'::text, ''::text, 'g'::text) ~~* '%500%'::text)
9. 42.000 42.000 ↓ 0.0 0 150

Index Scan using project_experts_profile_id_index on qualifications q0 (cost=0.42..3.13 rows=1 width=2,132) (actual time=0.278..0.280 rows=0 loops=150)

  • Index Cond: (profile_id = e1.id)
  • Filter: (type = 'prospect'::prospect_type)
  • Rows Removed by Filter: 1
10. 2.100 3.228 ↑ 1.0 1,479 1

Hash (cost=144.79..144.79 rows=1,479 width=742) (actual time=3.228..3.228 rows=1,479 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 1005kB
11. 1.128 1.128 ↑ 1.0 1,479 1

Seq Scan on projects p2 (cost=0.00..144.79 rows=1,479 width=742) (actual time=0.010..1.128 rows=1,479 loops=1)