Commit 159f95ee authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix slowquery that became really slow when I added 5000 virtual nodes

to the nodes table. The nodes table needs to come first when joining,
if you have a specific node you want to look at (in the where clause).
parent 3bc11458
......@@ -205,10 +205,10 @@ foreach my $n (@freed_nodes) {
# of the default values for its node type.
my $result =
DBQueryFatal("select control_net,nt.osid,nt.pxe_boot_path, " .
"n.def_boot_osid,n.def_boot_path, ".
"nt.isvirtnode, nt.imageable, o.osid ".
"from node_types as nt " .
"left join nodes as n on n.type=nt.type " .
" n.def_boot_osid,n.def_boot_path, ".
" nt.isvirtnode, nt.imageable, o.osid ".
" from nodes as n " .
"left join node_types as nt on n.type=nt.type " .
"left join os_info as o on o.path=nt.pxe_boot_path " .
"where node_id='$n'");
my ($control, $osid, $pxe_boot_path, $def_boot_osid, $def_boot_path,
......
Supports Markdown
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