explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rdcg : Optimization for: plan #pQyI

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.531 141.382 ↓ 1.0 782 1

Sort (cost=152,454.89..152,456.81 rows=769 width=8) (actual time=141.326..141.382 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=160950
2. 19.965 140.851 ↓ 1.0 782 1

Nested Loop (cost=331.77..152,418.03 rows=769 width=8) (actual time=12.009..140.851 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=160950
3. 33.451 40.699 ↓ 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=11.955..40.699 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=26802
  • Buffers: shared hit=26887
4. 7.248 7.248 ↓ 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=7.248..7.248 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
5. 80.187 80.187 ↓ 0.0 0 26,729

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

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