Simplify code to get largest table

We really do not have to sort the array, we just need the maximal value.

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-01-05 12:29:03 +01:00
parent c9b0935e7d
commit 03f2e37ef4

View File

@ -1478,11 +1478,8 @@ class DbQbe
}
$csize[$table] = $tsize[$table];
}
arsort($csize);
reset($csize);
$master = key($csize); // Largest
return $master;
// Return largest table
return array_search(max($csize), $csize);
}
/**