explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WwmJ

Settings
# exclusive inclusive rows x rows loops node
1. 1.034 10.654 ↓ 1.8 917 1

Hash Left Join (cost=91.14..31,355.15 rows=515 width=310) (actual time=0.456..10.654 rows=917 loops=1)

  • Output: caseentity0_.id, categoryen1_.name, (SubPlan 1), (SubPlan 2), countryent2_.name, stateentit3_.name, caseentity0_.name
  • Inner Unique: true
  • Hash Cond: (caseentity0_.state_id = stateentit3_.id)
  • Buffers: shared hit=4176
2. 0.127 1.360 ↓ 1.8 917 1

Hash Left Join (cost=62.01..1,666.49 rows=515 width=246) (actual time=0.387..1.360 rows=917 loops=1)

  • Output: caseentity0_.id, caseentity0_.name, caseentity0_.state_id, categoryen1_.name, countryent2_.name
  • Inner Unique: true
  • Hash Cond: (caseentity0_.country_id = countryent2_.id)
  • Buffers: shared hit=506
3. 0.244 1.108 ↓ 1.8 917 1

Hash Left Join (cost=53.36..1,656.49 rows=515 width=227) (actual time=0.261..1.108 rows=917 loops=1)

  • Output: caseentity0_.id, caseentity0_.name, caseentity0_.country_id, caseentity0_.state_id, categoryen1_.name
  • Inner Unique: true
  • Hash Cond: (caseentity0_.category_id = categoryen1_.id)
  • Buffers: shared hit=503
4. 0.662 0.854 ↓ 1.8 917 1

Bitmap Heap Scan on safekids."case" caseentity0_ (cost=24.24..1,626.00 rows=515 width=199) (actual time=0.246..0.854 rows=917 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
  • Recheck Cond: (to_tsvector('russian'::regconfig, caseentity0_.name) @@ to_tsquery('америка | Юдит'::text))
  • Filter: (caseentity0_.delete_dt IS NULL)
  • Heap Blocks: exact=495
  • Buffers: shared hit=502
5. 0.192 0.192 ↓ 1.8 917 1

Bitmap Index Scan on case_name_ts_vector_idx (cost=0.00..24.11 rows=515 width=0) (actual time=0.192..0.192 rows=917 loops=1)

  • Index Cond: (to_tsvector('russian'::regconfig, caseentity0_.name) @@ to_tsquery('америка | Юдит'::text))
  • Buffers: shared hit=7
6. 0.003 0.010 ↑ 283.3 3 1

Hash (cost=18.50..18.50 rows=850 width=36) (actual time=0.010..0.010 rows=3 loops=1)

  • Output: categoryen1_.name, categoryen1_.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
7. 0.007 0.007 ↑ 283.3 3 1

Seq Scan on safekids.category categoryen1_ (cost=0.00..18.50 rows=850 width=36) (actual time=0.007..0.007 rows=3 loops=1)

  • Output: categoryen1_.name, categoryen1_.id
  • Buffers: shared hit=1
8. 0.052 0.125 ↑ 1.0 251 1

Hash (cost=5.51..5.51 rows=251 width=27) (actual time=0.125..0.125 rows=251 loops=1)

  • Output: countryent2_.name, countryent2_.id
  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=3
9. 0.073 0.073 ↑ 1.0 251 1

Seq Scan on safekids.country countryent2_ (cost=0.00..5.51 rows=251 width=27) (actual time=0.006..0.073 rows=251 loops=1)

  • Output: countryent2_.name, countryent2_.id
  • Buffers: shared hit=3
10. 0.002 0.007 ↑ 121.4 7 1

Hash (cost=18.50..18.50 rows=850 width=36) (actual time=0.007..0.007 rows=7 loops=1)

  • Output: stateentit3_.name, stateentit3_.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
11. 0.005 0.005 ↑ 121.4 7 1

Seq Scan on safekids.state stateentit3_ (cost=0.00..18.50 rows=850 width=36) (actual time=0.004..0.005 rows=7 loops=1)

  • Output: stateentit3_.name, stateentit3_.id
  • Buffers: shared hit=1
12.          

SubPlan (for Hash Left Join)

13. 1.834 3.668 ↓ 0.0 0 917

Nested Loop (cost=4.34..20.85 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=917)

  • Output: actualstat4_.actual_dt
  • Inner Unique: true
  • Join Filter: (actualstat4_.status_id = statusenti5_.id)
  • Buffers: shared hit=2751
14. 0.917 0.917 ↑ 1.0 1 917

Index Scan using status_code_key on safekids.status statusenti5_ (cost=0.15..8.17 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=917)

  • Output: statusenti5_.id, statusenti5_.code, statusenti5_.name
  • Index Cond: ((statusenti5_.code)::text = 'opened'::text)
  • Buffers: shared hit=1834
15. 0.917 0.917 ↓ 0.0 0 917

Bitmap Heap Scan on safekids.actual_status actualstat4_ (cost=4.19..12.66 rows=2 width=8) (actual time=0.001..0.001 rows=0 loops=917)

  • Output: actualstat4_.id, actualstat4_.case_id, actualstat4_.status_id, actualstat4_.grounds_decision_id, actualstat4_.actual_dt, actualstat4_.is_actual, actualstat4_.reason
  • Recheck Cond: (actualstat4_.case_id = caseentity0_.id)
  • Filter: actualstat4_.is_actual
  • Buffers: shared hit=917
16. 0.000 0.000 ↓ 0.0 0 917

Bitmap Index Scan on actual_status_case_status_uix (cost=0.00..4.19 rows=5 width=0) (actual time=0.000..0.000 rows=0 loops=917)

  • Index Cond: (actualstat4_.case_id = caseentity0_.id)
  • Buffers: shared hit=917
17. 1.834 4.585 ↑ 1.0 1 917

Aggregate (cost=36.73..36.74 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=917)

  • Output: string_agg((convention7_.name)::text, ';'::text)
  • Buffers: shared hit=918
18. 0.913 2.751 ↓ 0.0 0 917

Hash Join (cost=14.91..36.70 rows=10 width=32) (actual time=0.003..0.003 rows=0 loops=917)

  • Output: convention7_.name
  • Hash Cond: (convention7_.id = caseconven6_.convention_id)
  • Buffers: shared hit=918
19. 0.004 0.004 ↑ 850.0 1 1

Seq Scan on safekids.convention convention7_ (cost=0.00..18.50 rows=850 width=36) (actual time=0.004..0.004 rows=1 loops=1)

  • Output: convention7_.id, convention7_.code, convention7_.name
  • Buffers: shared hit=1
20. 0.917 1.834 ↓ 0.0 0 917

Hash (cost=14.79..14.79 rows=10 width=4) (actual time=0.002..0.002 rows=0 loops=917)

  • Output: caseconven6_.convention_id
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=917
21. 0.917 0.917 ↓ 0.0 0 917

Bitmap Heap Scan on safekids.case_convention caseconven6_ (cost=4.23..14.79 rows=10 width=4) (actual time=0.001..0.001 rows=0 loops=917)

  • Output: caseconven6_.convention_id
  • Recheck Cond: (caseconven6_.case_id = caseentity0_.id)
  • Buffers: shared hit=917
22. 0.000 0.000 ↓ 0.0 0 917

Bitmap Index Scan on case_convention_case_ix (cost=0.00..4.23 rows=10 width=0) (actual time=0.000..0.000 rows=0 loops=917)

  • Index Cond: (caseconven6_.case_id = caseentity0_.id)
  • Buffers: shared hit=917
Planning time : 0.642 ms
Execution time : 10.833 ms