explain.depesz.com

PostgreSQL's explain analyze made readable

Result: twnA : ыыфыфыф

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Group (cost=1,241,597.19..1,241,624.79 rows=1,104 width=35) (actual rows= loops=)

  • Group Key: cards.surname, cards.name1, cards.name2, cards.birthday, cards.sex
2. 0.000 0.000 ↓ 0.0

Sort (cost=1,241,597.19..1,241,599.95 rows=1,104 width=31) (actual rows= loops=)

  • Sort Key: cards.surname, cards.name1, cards.name2, cards.birthday, cards.sex
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=143,173.81..1,241,541.39 rows=1,104 width=31) (actual rows= loops=)

  • Hash Cond: ((cards.profile)::text = (profilerep.id_profile)::text)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=143,167.95..1,241,465.08 rows=15,844 width=37) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Unique (cost=143,167.38..144,878.77 rows=136,911 width=30) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=143,167.38..143,509.66 rows=136,911 width=30) (actual rows= loops=)

  • Sort Key: ((dispensary_observation.surname)::text), ((dispensary_observation.name)::text), ((dispensary_observation.patronymic)::text), dispensary_observation.birthday
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7,480.45..128,210.90 rows=136,911 width=30) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on dispensary_observation_list (cost=0.00..1.18 rows=1 width=4) (actual rows= loops=)

  • Filter: ((year = 2019) AND (id_type = 2) AND (flag = 1))
9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on dispensary_observation (cost=7,480.45..126,840.62 rows=136,911 width=34) (actual rows= loops=)

  • Recheck Cond: (id_list = dispensary_observation_list.id)
  • Filter: (plan = '1'::numeric)
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on dispensary_observation_id_list_idx (cost=0.00..7,446.22 rows=144,772 width=0) (actual rows= loops=)

  • Index Cond: (id_list = dispensary_observation_list.id)
11. 0.000 0.000 ↓ 0.0

Index Scan using cards_surname_name1_name2_idx on cards (cost=0.56..8.00 rows=1 width=37) (actual rows= loops=)

  • Index Cond: (((surname)::text = (dispensary_observation.surname)::text) AND ((name1)::text = (dispensary_observation.name)::text) AND ((name2)::text = (dispensary_observation.patronymic)::text))
  • Filter: ((ctrldate >= '2019-01-01'::date) AND (ctrldate <= '2019-06-30'::date) AND (datein >= '2019-01-01'::date) AND ((form_code)::text = ANY ('{ДВ1,ДВ3}'::text[])) AND ((case_isrepeat)::text = '0'::text) AND (dispensary_observation.birthday = birthday))
12. 0.000 0.000 ↓ 0.0

Hash (cost=5.07..5.07 rows=63 width=6) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on profilerep (cost=0.00..5.07 rows=63 width=6) (actual rows= loops=)

  • Filter: ((prevexam >= '1'::numeric) AND (prevexam <= '3'::numeric))