explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 33h3

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 49.666 ↓ 3.3 10 1

Limit (cost=537.28..537.64 rows=3 width=517) (actual time=49.655..49.666 rows=10 loops=1)

2. 0.010 49.663 ↓ 3.3 10 1

Unique (cost=537.28..537.64 rows=3 width=517) (actual time=49.653..49.663 rows=10 loops=1)

3. 0.158 49.653 ↓ 3.3 10 1

Sort (cost=537.28..537.29 rows=3 width=517) (actual time=49.652..49.653 rows=10 loops=1)

  • Sort Key: users.id DESC, users.email, users.name, users.sname, users.fname, users.encrypted_password, users.role, users.gender, users.phone, users.show_phone_on_page, users.description, users.birthday, users.created_at, users.updated_at, users.reset_password_token, users.reset_password_sent_at, users.remember_created_at, users.sign_in_count, users.current_sign_in_at, users.last_sign_in_at, users.current_sign_in_ip, users.last_sign_in_ip, users.confirmation_token, users.confirmed_at, users.confirmation_sent_at, users.unconfirmed_email, users.avatar_file_name, users.avatar_content_type, users.avatar_file_size, users.avatar_updated_at, users.doctor_id, users.location_id, users.basic_setup, users.latitude, users.longitude, users.street, users.build_number, users.apartment, users.clinic_id, users.administrator_id, users.user_signal_mark_id, users.deleted_at, users.working, users.ssn, users.disability, users.working_at, users.merged_with_id
  • Sort Method: quicksort Memory: 42kB
4. 0.100 49.495 ↓ 14.0 42 1

Nested Loop Left Join (cost=9.67..537.26 rows=3 width=517) (actual time=44.647..49.495 rows=42 loops=1)

5. 5.025 49.269 ↓ 14.0 42 1

Bitmap Heap Scan on users (cost=9.39..512.33 rows=3 width=517) (actual time=44.581..49.269 rows=42 loops=1)

  • Recheck Cond: ((sname)::text ~~* '%Іванов%'::text)
  • Rows Removed by Index Recheck: 1
  • Filter: ((deleted_at IS NULL) AND basic_setup AND ((name)::text ~~* '%Іван%'::text))
  • Rows Removed by Filter: 1857
  • Heap Blocks: exact=1822
6. 44.244 44.244 ↓ 14.6 1,900 1

Bitmap Index Scan on index_users_on_sname (cost=0.00..9.39 rows=130 width=0) (actual time=44.244..44.244 rows=1,900 loops=1)

  • Index Cond: ((sname)::text ~~* '%Іванов%'::text)
7. 0.126 0.126 ↓ 0.0 0 42

Index Only Scan using index_user_cards_on_user_id on user_cards (cost=0.28..8.30 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=42)

  • Index Cond: (user_id = users.id)
  • Heap Fetches: 2
Planning time : 0.862 ms
Execution time : 49.788 ms