explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pQyI

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.520 210.231 ↓ 1.0 782 1

Sort (cost=151,397.94..151,399.86 rows=769 width=8) (actual time=210.174..210.231 rows=782 loops=1)

  • Output: users.id, (ts_rank(users_1.full_name_tsv, to_tsquery('simple'::regconfig, ((''' '::text || unaccent('Henry'::text)) || ' '''::text)), 0))
  • Sort Key: (ts_rank(users_1.full_name_tsv, to_tsquery('simple'::regconfig, ((''' '::text || unaccent('Henry'::text)) || ' '''::text)), 0)) DESC, users.id
  • Sort Method: quicksort Memory: 61kB
  • Buffers: shared hit=274,402
2. 10.455 209.711 ↓ 1.0 782 1

Nested Loop Semi Join (cost=332.34..151,361.07 rows=769 width=8) (actual time=16.707..209.711 rows=782 loops=1)

  • Output: users.id, ts_rank(users_1.full_name_tsv, to_tsquery('simple'::regconfig, ((''' '::text || unaccent('Henry'::text)) || ' '''::text)), 0)
  • Buffers: shared hit=274,402
3. 19.904 145.798 ↓ 1.2 26,729 1

Nested Loop (cost=331.77..118,377.01 rows=22,832 width=44) (actual time=16.649..145.798 rows=26,729 loops=1)

  • Output: users.id, users_1.full_name_tsv, users_1.id
  • Buffers: shared hit=140,453
4. 34.110 45.707 ↓ 1.2 26,729 1

Bitmap Heap Scan on public.users users_1 (cost=331.21..49,713.05 rows=22,832 width=40) (actual time=16.638..45.707 rows=26,729 loops=1)

  • Output: users_1.id, users_1.email, users_1.created_at, users_1.updated_at, users_1.last_name, users_1.first_name, users_1.level, users_1.points, users_1.avatar_file_name, users_1.avatar_content_type, users_1.avatar_file_size, users_1.avatar_updated_at, users_1.confirmed_at, users_1.locale, users_1.email_hash, users_1.trainings_count, users_1.weight_unit, users_1.height_unit, users_1.followers_count, users_1.followables_count, users_1.full_name_tsv, users_1.registration_source, users_1.current_personal_best_trainings, users_1.featured_athlete, users_1.password_digest, users_1.about, users_1.social_accounts, users_1.notification_settings, users_1.registration_country, users_1.emails_allowed, users_1.training_city_id, users_1.training_spot, users_1.fl_uid, users_1.measurement_system, users_1.application_source, users_1.time_zone, users_1.legacy_workout_subscription_start_date
  • Recheck Cond: (users_1.full_name_tsv @@ to_tsquery('simple'::regconfig, ((''' '::text || unaccent('Henry'::text)) || ' '''::text)))
  • Heap Blocks: exact=26,802
  • Buffers: shared hit=26,887
5. 11.597 11.597 ↓ 1.2 27,503 1

Bitmap Index Scan on index_users_on_full_name_tsv (cost=0.00..325.50 rows=22,832 width=0) (actual time=11.597..11.597 rows=27,503 loops=1)

  • Index Cond: (users_1.full_name_tsv @@ to_tsquery('simple'::regconfig, ((''' '::text || unaccent('Henry'::text)) || ' '''::text)))
  • Buffers: shared hit=85
6. 80.187 80.187 ↑ 1.0 1 26,729

Index Only Scan using users_pkey on public.users (cost=0.56..3.00 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=26,729)

  • Output: users.id
  • Index Cond: (users.id = users_1.id)
  • Heap Fetches: 6,530
  • Buffers: shared hit=113,566
7. 53.458 53.458 ↓ 0.0 0 26,729

Index Scan using users_pkey on public.users u (cost=0.56..1.44 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=26,729)

  • Output: u.id, u.email, u.created_at, u.updated_at, u.last_name, u.first_name, u.level, u.points, u.avatar_file_name, u.avatar_content_type, u.avatar_file_size, u.avatar_updated_at, u.confirmed_at, u.locale, u.email_hash, u.trainings_count, u.weight_unit, u.height_unit, u.followers_count, u.followables_count, u.full_name_tsv, u.registration_source, u.current_personal_best_trainings, u.featured_athlete, u.password_digest, u.about, u.social_accounts, u.notification_settings, u.registration_country, u.emails_allowed, u.training_city_id, u.training_spot, u.fl_uid, u.measurement_system, u.application_source, u.time_zone, u.legacy_workout_subscription_start_date
  • Index Cond: (u.id = users.id)
  • Filter: (u.updated_at > '2020-02-24 15:01:15.399207'::timestamp without time zone)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=133,949
Planning time : 1.592 ms
Execution time : 210.440 ms