using dbc.tablesize, determine total tablesize for a specific user

Analytics

using dbc.tablesize, determine total tablesize for a specific user

Using TD SQL Assistant, how can I find the total size of all my tables I have created?

Just for my username.

What statistics are in dbc.tablesize?

will it collect tablesize info for tables I have created if I dd not use "Collect statistics"?

Thank you,

Stephanie

Tags (1)
2 REPLIES

Re: using dbc.tablesize, determine total tablesize for a specific user

The information in DBC.TableSize is maintained for all tables and is not affected in any way by the use of "collect statistics".

This query will show the disk space used by each table you have created.

select databasename, tablename, sum(currentperm) from dbc.tablesize a
where exists
(select 1 from dbc.tables b
where a.databasename = b.databasename
and a.tablename = b.tablename
and b.creatorname = user)
group by 1, 2;

Omit the group by clause if you want only the grand total.

N/A

Re: using dbc.tablesize, determine total tablesize for a specific user

nice jim .. :D