Commit da734c69 authored by Mike Hibler's avatar Mike Hibler

Speed up listing of hwdown experiment: when I compute the temp table of

nodelog info, exclude the plab nodes that we are not going to display anyway.
parent 5326f9c5
......@@ -105,12 +105,24 @@ function SHOWNODES($pid, $eid, $sortby, $showclass) {
# for all reserved nodes to re-join with nodelog to extract the latest
# log message.
#
DBQueryFatal("CREATE TEMPORARY TABLE nodelogtemp ".
"SELECT r.node_id, MAX(reported) AS reported ".
"FROM reserved AS r ".
"LEFT JOIN nodelog AS l ON r.node_id=l.node_id ".
"WHERE r.eid='$eid' and r.pid='$pid' ".
"GROUP BY r.node_id");
if (!empty($classclause) || !empty($noclassclause)) {
DBQueryFatal("CREATE TEMPORARY TABLE nodelogtemp ".
"SELECT r.node_id, MAX(reported) AS reported ".
"FROM reserved AS r ".
"LEFT JOIN nodelog AS l ON r.node_id=l.node_id ".
"LEFT JOIN nodes AS n ON r.node_id=n.node_id ".
"LEFT JOIN node_types AS nt ON n.type=nt.type ".
"WHERE r.eid='$eid' and r.pid='$pid' ".
"$classclause $noclassclause ".
"GROUP BY r.node_id");
} else {
DBQueryFatal("CREATE TEMPORARY TABLE nodelogtemp ".
"SELECT r.node_id, MAX(reported) AS reported ".
"FROM reserved AS r ".
"LEFT JOIN nodelog AS l ON r.node_id=l.node_id ".
"WHERE r.eid='$eid' and r.pid='$pid' ".
"GROUP BY r.node_id");
}
#
# Now join this table and nodelog with the standard set of tables
# to get all the info we need. Note the inner join with the temp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment