Commit 563c229b authored by Leigh Stoller's avatar Leigh Stoller

Wow! Its amazing what a little order among joins can do. Some heavily

used queries are now 0.01 seconds instead of 0.5 seconds!
parent 900d9b0c
......@@ -1800,8 +1800,8 @@ sub TBIsNodeRemote($)
my ($nodeid) = @_;
my $query_result =
DBQueryFatal("select isremotenode from node_types as t ".
"left join nodes as n on t.type=n.type ".
DBQueryFatal("select isremotenode from nodes as n ".
"left join node_types as t on t.type=n.type ".
"where n.node_id='$nodeid'");
if (! $query_result->num_rows) {
......@@ -1824,8 +1824,8 @@ sub TBIsNodeVirtual($;$)
my ($nodeid, $jailed) = @_;
my $query_result =
DBQueryFatal("select isvirtnode,n.jailflag from node_types as t ".
"left join nodes as n on t.type=n.type ".
DBQueryFatal("select isvirtnode,n.jailflag from nodes as n ".
"left join node_types as t on t.type=n.type ".
"where n.node_id='$nodeid'");
if (! $query_result->num_rows) {
......
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