explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XFJc

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 932.349 ↑ 2,357.6 11 1

Nested Loop Left Join (cost=0.15..1,780,942.18 rows=25,934 width=219) (actual time=36.769..932.349 rows=11 loops=1)

  • Output: caseentity0_.id, categoryen1_.name, caseentity0_.name
  • Inner Unique: true
  • Buffers: shared hit=3100
2. 932.217 932.253 ↑ 2,357.6 11 1

Seq Scan on safekids."case" caseentity0_ (cost=0.00..1,776,550.84 rows=25,934 width=199) (actual time=36.756..932.253 rows=11 loops=1)

  • Output: caseentity0_.id, caseentity0_.category_id, caseentity0_.create_dt, caseentity0_.steal_dt, caseentity0_.state_id, caseentity0_.direction_id, caseentity0_.executor_id, caseentity0_.country_id, caseentity0_.central_authority_id, caseentity0_.fabula, caseentity0_.delete_dt, caseentity0_.name
  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (to_tsvector('russian'::regconfig, caseentity0_.name) @@ '''иван'''::tsquery))
  • Rows Removed by Filter: 51598
  • Buffers: shared hit=3078
3.          

SubPlan (for Seq Scan)

4. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.58..34.10 rows=1 width=0) (never executed)

  • Inner Unique: true
5. 0.000 0.000 ↓ 0.0 0

Index Scan using participant_case_ix on safekids.participant participan8_ (cost=0.29..8.34 rows=3 width=4) (never executed)

  • Output: participan8_.id, participan8_.case_id, participan8_.person_id, participan8_.participant_type_id, participan8_.participant_status_id, participan8_.status_type_id
  • Index Cond: (caseentity0_.id = participan8_.case_id)
6. 0.000 0.000 ↓ 0.0 0

Index Scan using person_pkey on safekids.person personenti9_ (cost=0.29..8.56 rows=1 width=4) (never executed)

  • Output: personenti9_.id, personenti9_.gender_id, personenti9_.firstname, personenti9_.lastname, personenti9_.patrname, personenti9_.birth_dt, personenti9_.birth_year, personenti9_.citizenship_id, personenti9_.birthplace, personenti9_.address_reg, personenti9_.address_fact, personenti9_.employment_type_id, personenti9_.employment_place, personenti9_.phone, personenti9_.email, personenti9_.social_links, personenti9_.mother_initials, personenti9_.father_initials, personenti9_.employment_existence, personenti9_.employment_status, personenti9_.employment_dt, personenti9_.contacts
  • Index Cond: (personenti9_.id = participan8_.person_id)
  • Filter: (fullname_vector(personenti9_.lastname, personenti9_.firstname, personenti9_.patrname) @@ '''иван'''::tsquery)
7. 0.006 0.036 ↑ 34.7 6 1

Nested Loop (cost=17.90..2,039.82 rows=208 width=4) (actual time=0.021..0.036 rows=6 loops=1)

  • Output: participan8__1.case_id
  • Buffers: shared hit=26
8. 0.007 0.018 ↑ 34.7 6 1

Bitmap Heap Scan on safekids.person personenti9__1 (cost=17.61..481.78 rows=208 width=4) (actual time=0.014..0.018 rows=6 loops=1)

  • Output: personenti9__1.id, personenti9__1.gender_id, personenti9__1.firstname, personenti9__1.lastname, personenti9__1.patrname, personenti9__1.birth_dt, personenti9__1.birth_year, personenti9__1.citizenship_id, personenti9__1.birthplace, personenti9__1.address_reg, personenti9__1.address_fact, personenti9__1.employment_type_id, personenti9__1.employment_place, personenti9__1.phone, personenti9__1.email, personenti9__1.social_links, personenti9__1.mother_initials, personenti9__1.father_initials, personenti9__1.employment_existence, personenti9__1.employment_status, personenti9__1.employment_dt, personenti9__1.contacts
  • Recheck Cond: (fullname_vector(personenti9__1.lastname, personenti9__1.firstname, personenti9__1.patrname) @@ '''иван'''::tsquery)
  • Heap Blocks: exact=4
  • Buffers: shared hit=8
9. 0.011 0.011 ↑ 34.7 6 1

Bitmap Index Scan on person_func_name_trgm_idx (cost=0.00..17.56 rows=208 width=0) (actual time=0.011..0.011 rows=6 loops=1)

  • Index Cond: (fullname_vector(personenti9__1.lastname, personenti9__1.firstname, personenti9__1.patrname) @@ '''иван'''::tsquery)
  • Buffers: shared hit=4
10. 0.012 0.012 ↑ 1.0 1 6

Index Scan using participant_person_ix on safekids.participant participan8__1 (cost=0.29..7.48 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=6)

  • Output: participan8__1.id, participan8__1.case_id, participan8__1.person_id, participan8__1.participant_type_id, participan8__1.participant_status_id, participan8__1.status_type_id
  • Index Cond: (participan8__1.person_id = personenti9__1.id)
  • Buffers: shared hit=18
11. 0.066 0.066 ↑ 1.0 1 11

Index Scan using category_pkey on safekids.category categoryen1_ (cost=0.15..0.17 rows=1 width=36) (actual time=0.006..0.006 rows=1 loops=11)

  • Output: categoryen1_.id, categoryen1_.code, categoryen1_.name
  • Index Cond: (caseentity0_.category_id = categoryen1_.id)
  • Buffers: shared hit=22
Planning time : 0.745 ms
Execution time : 932.418 ms