explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K8bj

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 131.716 ↓ 0.0 0 1

Sort (cost=4,229.64..4,230.11 rows=187 width=84) (actual time=131.716..131.716 rows=0 loops=1)

  • Sort Key: (CASE WHEN ((SubPlan 4) = 1) THEN ((SubPlan 5))::text ELSE (SubPlan 6) END)
  • Sort Method: quicksort Memory: 25kB
2. 48.439 131.696 ↓ 0.0 0 1

Hash Right Join (cost=148.23..4,222.58 rows=187 width=84) (actual time=131.696..131.696 rows=0 loops=1)

  • Hash Cond: (rules1_.event_definition_id = eventdefin0_.id)
  • Filter: ((lower(CASE WHEN ((SubPlan 7) = 1) THEN ((SubPlan 8))::text ELSE (SubPlan 9) END) ~~ ''::text) OR (lower(CASE WHEN ((SubPlan 10) = 1) THEN ((SubPlan 11))::text ELSE (SubPlan 12) END) ~~ ''::text) OR (lower((manufactur2_.name)::text) ~~ ''::text))
  • Rows Removed by Filter: 12,549
3. 3.223 4.868 ↑ 1.0 12,471 1

Hash Left Join (cost=7.46..332.60 rows=12,471 width=29) (actual time=0.226..4.868 rows=12,471 loops=1)

  • Hash Cond: (rules1_.manufacturing_entity = manufactur2_.id)
4. 1.471 1.471 ↑ 1.0 12,471 1

Seq Scan on "EventRule" rules1_ (cost=0.00..291.71 rows=12,471 width=32) (actual time=0.007..1.471 rows=12,471 loops=1)

5. 0.106 0.174 ↑ 1.0 198 1

Hash (cost=4.98..4.98 rows=198 width=29) (actual time=0.174..0.174 rows=198 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
6. 0.068 0.068 ↑ 1.0 198 1

Seq Scan on "ManufacturingEntity" manufactur2_ (cost=0.00..4.98 rows=198 width=29) (actual time=0.009..0.068 rows=198 loops=1)

7. 1.774 3.095 ↑ 1.1 4,298 1

Hash (cost=82.01..82.01 rows=4,701 width=20) (actual time=3.095..3.095 rows=4,298 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 283kB
8. 1.321 1.321 ↑ 1.1 4,298 1

Seq Scan on "EventDefinition" eventdefin0_ (cost=0.00..82.01 rows=4,701 width=20) (actual time=0.014..1.321 rows=4,298 loops=1)

9.          

SubPlan (for Hash Right Join)

10. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=2.51..2.52 rows=1 width=8) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin3_ (cost=0.29..2.50 rows=1 width=45) (never executed)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
12. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin4_ (cost=0.29..2.50 rows=1 width=45) (never executed)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
13. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=4.74..4.75 rows=1 width=32) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin5_ (cost=0.29..4.74 rows=3 width=45) (never executed)

  • Index Cond: (event_definition_id = eventdefin0_.id)
15. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=2.51..2.52 rows=1 width=8) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin12_ (cost=0.29..2.50 rows=1 width=45) (never executed)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
17. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin13_ (cost=0.29..2.50 rows=1 width=45) (never executed)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
18. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=4.74..4.75 rows=1 width=32) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin14_ (cost=0.29..4.74 rows=3 width=45) (never executed)

  • Index Cond: (event_definition_id = eventdefin0_.id)
20. 0.000 25.098 ↑ 1.0 1 12,549

Aggregate (cost=2.51..2.52 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=12,549)

21. 25.098 25.098 ↑ 1.0 1 12,549

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin6_ (cost=0.29..2.50 rows=1 width=45) (actual time=0.001..0.002 rows=1 loops=12,549)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
22. 12.549 12.549 ↑ 1.0 1 12,549

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin7_ (cost=0.29..2.50 rows=1 width=45) (actual time=0.001..0.001 rows=1 loops=12,549)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
23. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=4.74..4.75 rows=1 width=32) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin8_ (cost=0.29..4.74 rows=3 width=45) (never executed)

  • Index Cond: (event_definition_id = eventdefin0_.id)
25. 12.549 25.098 ↑ 1.0 1 12,549

Aggregate (cost=2.51..2.52 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=12,549)

26. 12.549 12.549 ↑ 1.0 1 12,549

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin9_ (cost=0.29..2.50 rows=1 width=45) (actual time=0.001..0.001 rows=1 loops=12,549)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
27. 12.549 12.549 ↑ 1.0 1 12,549

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin10_ (cost=0.29..2.50 rows=1 width=45) (actual time=0.001..0.001 rows=1 loops=12,549)

  • Index Cond: ((event_definition_id = eventdefin0_.id) AND (language_id = 'c56290fd-b7d6-41a4-acd9-f3e42a561a1d'::uuid))
28. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=4.74..4.75 rows=1 width=32) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Index Scan using "EventDefinitionTranslation_event_definition_id_lang" on "EventDefinitionTranslation" eventdefin11_ (cost=0.29..4.74 rows=3 width=45) (never executed)

  • Index Cond: (event_definition_id = eventdefin0_.id)