explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PSCl

Settings
# exclusive inclusive rows x rows loops node
1. 1.191 654.777 ↓ 1.8 917 1

Hash Left Join (cost=1,037.92..49,494.35 rows=515 width=310) (actual time=6.743..654.777 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_.category_id = categoryen1_.id)
  • Buffers: shared hit=8771
2. 0.000 641.657 ↓ 1.8 917 1

Nested Loop Left Join (cost=1,008.80..19,805.69 rows=515 width=246) (actual time=6.696..641.657 rows=917 loops=1)

  • Output: caseentity0_.id, caseentity0_.name, caseentity0_.category_id, countryent2_.name, stateentit3_.name
  • Inner Unique: true
  • Buffers: shared hit=5101
3. 46.288 661.181 ↓ 1.8 917 1

Gather (cost=1,008.65..19,671.54 rows=515 width=218) (actual time=6.674..661.181 rows=917 loops=1)

  • Output: caseentity0_.id, caseentity0_.name, caseentity0_.category_id, caseentity0_.state_id, countryent2_.name
  • Workers Planned: 1
  • Workers Launched: 1
  • Buffers: shared hit=3267
4. 0.271 614.893 ↓ 1.5 459 2

Hash Left Join (cost=8.65..18,620.04 rows=303 width=218) (actual time=3.698..614.893 rows=459 loops=2)

  • Output: caseentity0_.id, caseentity0_.name, caseentity0_.category_id, caseentity0_.state_id, countryent2_.name
  • Inner Unique: true
  • Hash Cond: (caseentity0_.country_id = countryent2_.id)
  • Buffers: shared hit=3267
  • Worker 0: actual time=1.984..591.817 rows=403 loops=1
  • Buffers: shared hit=1708
5. 614.457 614.457 ↓ 1.5 459 2

Parallel Seq Scan on safekids."case" caseentity0_ (cost=0.00..18,610.60 rows=303 width=199) (actual time=3.473..614.457 rows=459 loops=2)

  • 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: ((caseentity0_.delete_dt IS NULL) AND (to_tsvector(caseentity0_.name) @@ to_tsquery('америка | Юдит'::text)))
  • Rows Removed by Filter: 25346
  • Buffers: shared hit=3209
  • Worker 0: actual time=1.633..591.300 rows=403 loops=1
  • Buffers: shared hit=1653
6. 0.044 0.165 ↑ 1.0 251 2

Hash (cost=5.51..5.51 rows=251 width=27) (actual time=0.165..0.165 rows=251 loops=2)

  • Output: countryent2_.name, countryent2_.id
  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=6
  • Worker 0: actual time=0.240..0.240 rows=251 loops=1
  • Buffers: shared hit=3
7. 0.121 0.121 ↑ 1.0 251 2

Seq Scan on safekids.country countryent2_ (cost=0.00..5.51 rows=251 width=27) (actual time=0.093..0.121 rows=251 loops=2)

  • Output: countryent2_.name, countryent2_.id
  • Buffers: shared hit=6
  • Worker 0: actual time=0.171..0.202 rows=251 loops=1
  • Buffers: shared hit=3
8. 0.917 0.917 ↑ 1.0 1 917

Index Scan using state_pkey on safekids.state stateentit3_ (cost=0.15..0.26 rows=1 width=36) (actual time=0.001..0.001 rows=1 loops=917)

  • Output: stateentit3_.id, stateentit3_.code, stateentit3_.name
  • Index Cond: (caseentity0_.state_id = stateentit3_.id)
  • Buffers: shared hit=1834
9. 0.001 0.008 ↑ 283.3 3 1

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

  • Output: categoryen1_.name, categoryen1_.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
10. 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.006..0.007 rows=3 loops=1)

  • Output: categoryen1_.name, categoryen1_.id
  • Buffers: shared hit=1
11.          

SubPlan (for Hash Left Join)

12. 2.751 5.502 ↓ 0.0 0 917

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

  • Output: actualstat4_.actual_dt
  • Inner Unique: true
  • Join Filter: (actualstat4_.status_id = statusenti5_.id)
  • Buffers: shared hit=2751
13. 1.834 1.834 ↑ 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.002..0.002 rows=1 loops=917)

  • Output: statusenti5_.id, statusenti5_.code, statusenti5_.name
  • Index Cond: ((statusenti5_.code)::text = 'opened'::text)
  • Buffers: shared hit=1834
14. 0.000 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
15. 0.917 0.917 ↓ 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.001..0.001 rows=0 loops=917)

  • Index Cond: (actualstat4_.case_id = caseentity0_.id)
  • Buffers: shared hit=917
16. 2.751 6.419 ↑ 1.0 1 917

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

  • Output: string_agg((convention7_.name)::text, ';'::text)
  • Buffers: shared hit=918
17. 0.912 3.668 ↓ 0.0 0 917

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

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

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

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

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

  • Output: caseconven6_.convention_id
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=917
20. 0.000 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
21. 0.917 0.917 ↓ 0.0 0 917

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

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