explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aLGM : Optimization for: teste; plan #yxAF

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 334.282 1,121.084 ↓ 1.1 180,505 1

Hash Join (cost=7,706.43..11,952.29 rows=166,202 width=112) (actual time=387.089..1,121.084 rows=180,505 loops=1)

  • Hash Cond: ((entity_variables.id = entity_variable_dimensions.entity_variable_id) AND (entity_dimensions.dimension_id = entity_variable_dimensions.dimension_id))
2. 186.343 467.860 ↑ 1.0 183,572 1

Hash Join (cost=1,332.81..4,614.85 rows=183,581 width=24) (actual time=67.179..467.860 rows=183,572 loops=1)

  • Hash Cond: (entity_variables.entity_id = entity_dimensions.entity_id)
3. 66.780 281.382 ↑ 1.0 36,715 1

Hash Join (cost=1,330.21..2,271.60 rows=36,716 width=24) (actual time=67.034..281.382 rows=36,715 loops=1)

  • Hash Cond: (entityvariables.id = entity_variables.id)
4. 63.317 153.719 ↑ 1.0 36,715 1

Hash Join (cost=125.12..970.12 rows=36,716 width=16) (actual time=5.897..153.719 rows=36,715 loops=1)

  • Hash Cond: (entityvariables.variable_id = variables.id)
5. 51.564 84.540 ↑ 1.0 36,715 1

Append (cost=0.00..748.49 rows=36,716 width=16) (actual time=0.009..84.540 rows=36,715 loops=1)

6. 32.909 32.909 ↑ 1.0 36,715 1

Seq Scan on entity_variables entityvariables (cost=0.00..746.15 rows=36,715 width=16) (actual time=0.008..32.909 rows=36,715 loops=1)

7. 0.002 0.067 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=1.04..2.34 rows=1 width=16) (actual time=0.067..0.067 rows=0 loops=1)

8. 0.023 0.065 ↓ 0.0 0 1

Hash Join (cost=1.04..2.33 rows=1 width=46) (actual time=0.065..0.065 rows=0 loops=1)

  • Hash Cond: (entity_units.id = entityunitvariables.entity_unit_id)
9. 0.032 0.032 ↑ 20.0 1 1

Seq Scan on entity_units (cost=0.00..1.20 rows=20 width=8) (actual time=0.031..0.032 rows=1 loops=1)

10. 0.002 0.010 ↓ 0.0 0 1

Hash (cost=1.03..1.03 rows=1 width=12) (actual time=0.009..0.010 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
11. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on entity_unit_variables entityunitvariables (cost=0.00..1.03 rows=1 width=12) (actual time=0.007..0.008 rows=0 loops=1)

  • Filter: (entity_unit_id IS NULL)
  • Rows Removed by Filter: 3
12. 2.972 5.862 ↑ 1.0 3,072 1

Hash (cost=86.72..86.72 rows=3,072 width=4) (actual time=5.862..5.862 rows=3,072 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 140kB
13. 2.890 2.890 ↑ 1.0 3,072 1

Seq Scan on variables (cost=0.00..86.72 rows=3,072 width=4) (actual time=0.006..2.890 rows=3,072 loops=1)

14. 31.382 60.883 ↑ 1.0 36,715 1

Hash (cost=746.15..746.15 rows=36,715 width=8) (actual time=60.883..60.883 rows=36,715 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 1947kB
15. 29.501 29.501 ↑ 1.0 36,715 1

Seq Scan on entity_variables (cost=0.00..746.15 rows=36,715 width=8) (actual time=0.013..29.501 rows=36,715 loops=1)

16. 0.067 0.135 ↑ 1.0 71 1

Hash (cost=1.71..1.71 rows=71 width=8) (actual time=0.134..0.135 rows=71 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
17. 0.068 0.068 ↑ 1.0 71 1

Seq Scan on entity_dimensions (cost=0.00..1.71 rows=71 width=8) (actual time=0.014..0.068 rows=71 loops=1)

  • Filter: active
18. 168.792 318.942 ↑ 1.0 180,505 1

Hash (cost=3,666.05..3,666.05 rows=180,505 width=8) (actual time=318.942..318.942 rows=180,505 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 9099kB
19. 150.150 150.150 ↑ 1.0 180,505 1

Seq Scan on entity_variable_dimensions (cost=0.00..3,666.05 rows=180,505 width=8) (actual time=0.022..150.150 rows=180,505 loops=1)

Planning time : 1.832 ms
Execution time : 1,247.769 ms