explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lfng

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=353,990.66..354,017.46 rows=10,720 width=168) (actual rows= loops=)

  • Sort Key: i.subgroup_id, i.dimension_short
2.          

CTE var_downl

3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=350,974.43..350,977.59 rows=316 width=4) (actual rows= loops=)

  • Group Key: t5021_gus_data.variable_id
4. 0.000 0.000 ↓ 0.0

Seq Scan on t5021_gus_data (cost=0.00..315,085.54 rows=14,355,554 width=4) (actual rows= loops=)

5.          

CTE data_info

6. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,499.51..1,753.95 rows=6,785 width=138) (actual rows= loops=)

  • Group Key: sg.id, sg.name, v_1.id, v_1.measure_unit_name
7. 0.000 0.000 ↓ 0.0

Sort (cost=1,499.51..1,516.47 rows=6,785 width=116) (actual rows= loops=)

  • Sort Key: sg.id, sg.name, v_1.id, v_1.measure_unit_name
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=576.85..1,067.71 rows=6,785 width=116) (actual rows= loops=)

  • Hash Cond: (((v_1.subject_id)::text = (sg.id)::text) AND (vd.dimension_no = sgd.dimension_no))
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=131.73..453.70 rows=10,104 width=40) (actual rows= loops=)

  • Hash Cond: (vd.variable_id = v_1.id)
10. 0.000 0.000 ↓ 0.0

Seq Scan on t5020_gus_variables_dimensions vd (cost=0.00..183.04 rows=10,104 width=30) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=76.88..76.88 rows=4,388 width=14) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on t5019_gus_variables v_1 (cost=0.00..76.88 rows=4,388 width=14) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=396.28..396.28 rows=3,256 width=92) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash Join (cost=292.95..396.28 rows=3,256 width=92) (actual rows= loops=)

  • Hash Cond: ((sgd.subgroup_id)::text = (sg.id)::text)
15. 0.000 0.000 ↓ 0.0

Seq Scan on t5014_gus_subgroups_dimensions sgd (cost=0.00..58.56 rows=3,256 width=26) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=270.20..270.20 rows=1,820 width=66) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on t5013_gus_subgroups sg (cost=0.00..270.20 rows=1,820 width=66) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=10.27..541.53 rows=10,720 width=168) (actual rows= loops=)

  • Hash Cond: (i.variable_id = v.variable_id)
19. 0.000 0.000 ↓ 0.0

CTE Scan on data_info i (cost=0.00..135.70 rows=6,785 width=164) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash (cost=6.32..6.32 rows=316 width=4) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

CTE Scan on var_downl v (cost=0.00..6.32 rows=316 width=4) (actual rows= loops=)