Add row count and table size for Oracle tables
This commit is contained in:
parent
7f1afde592
commit
a280179bd5
|
@ -190,8 +190,8 @@ UNION SELECT view_name, 'view' FROM user_views"
|
||||||
function table_status($name = "") {
|
function table_status($name = "") {
|
||||||
$return = array();
|
$return = array();
|
||||||
$search = q($name);
|
$search = q($name);
|
||||||
foreach (get_rows('SELECT table_name "Name", \'table\' "Engine" FROM all_tables WHERE tablespace_name = ' . q(DB) . ($name != "" ? " AND table_name = $search" : "") . "
|
foreach (get_rows('SELECT table_name "Name", \'table\' "Engine", avg_row_len * num_rows "Data_length", num_rows "Rows" FROM all_tables WHERE tablespace_name = ' . q(DB) . ($name != "" ? " AND table_name = $search" : "") . "
|
||||||
UNION SELECT view_name, 'view' FROM user_views" . ($name != "" ? " WHERE view_name = $search" : "")
|
UNION SELECT view_name, 'view', 0, 0 FROM user_views" . ($name != "" ? " WHERE view_name = $search" : "")
|
||||||
) as $row) {
|
) as $row) {
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
return $row;
|
return $row;
|
||||||
|
|
Loading…
Reference in a new issue