explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mk3Q

Settings
# exclusive inclusive rows x rows loops node
1. 2.556 475.846 ↓ 3.3 10 1

Limit (cost=65,393.38..65,393.74 rows=3 width=517) (actual time=473.273..475.846 rows=10 loops=1)

2. 0.020 473.290 ↓ 3.3 10 1

Unique (cost=65,393.38..65,393.74 rows=3 width=517) (actual time=473.271..473.290 rows=10 loops=1)

3. 0.158 473.270 ↓ 3.3 10 1

Sort (cost=65,393.38..65,393.39 rows=3 width=517) (actual time=473.268..473.270 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. 11.137 473.112 ↓ 14.0 42 1

Nested Loop Left Join (cost=1,000.00..65,393.36 rows=3 width=517) (actual time=63.899..473.112 rows=42 loops=1)

  • Join Filter: (user_cards.user_id = users.id)
  • Rows Removed by Join Filter: 245992
5. 0.000 450.047 ↓ 14.0 42 1

Gather (cost=1,000.00..65,008.58 rows=3 width=517) (actual time=60.300..450.047 rows=42 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 461.385 461.385 ↓ 14.0 14 3

Parallel Seq Scan on users (cost=0.00..64,008.28 rows=1 width=517) (actual time=57.248..461.385 rows=14 loops=3)

  • Filter: ((deleted_at IS NULL) AND basic_setup AND ((name)::text ~~* '%Іван%'::text) AND ((sname)::text ~~* '%Іванов%'::text))
  • Rows Removed by Filter: 494721
7. 10.240 11.928 ↑ 1.0 5,857 42

Materialize (cost=0.00..135.85 rows=5,857 width=4) (actual time=0.002..0.284 rows=5,857 loops=42)

8. 1.688 1.688 ↑ 1.0 5,857 1

Seq Scan on user_cards (cost=0.00..106.57 rows=5,857 width=4) (actual time=0.017..1.688 rows=5,857 loops=1)

Planning time : 0.734 ms
Execution time : 475.949 ms