Eliminate one db call in IP subnet utilization report. Limit clause is not applied until after all rows to be returned are calculated so calling has_rows provides no optimization versus calling ->all in controller and checking for results before sending to template. Also use HashRefInflator.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[% USE CSV %]
|
||||
[% CSV.dump([ 'Subnet' 'Size' 'Number of Active Nodes' 'Percent Utilization' ]) %]
|
||||
|
||||
[% FOREACH row IN results.all %]
|
||||
[% FOREACH row IN results %]
|
||||
[% mylist = [] %]
|
||||
[% mylist.push(row.subnet) %]
|
||||
[% mylist.push(row.subnet_size) %]
|
||||
|
||||
Reference in New Issue
Block a user