on 02-03-2010 10:07 AM
Hello,
we're using "plain"(==only MaxDB, without any SAP on top) MaxDB 7.5.0.38 on linux and we wanted to know how we can determine the size of a table (how much disk space a table uses).
Is this possible, and if yes, how ?
thanks in advance...GERD...
> we're using "plain"(==only MaxDB, without any SAP on top) MaxDB 7.5.0.38 on linux and we wanted to know how we can determine the size of a table (how much disk space a table uses).
>
> Is this possible, and if yes, how ?
That's pretty easy - just make sure that the optimizer statistics are current.
Then you can run the following statement
select owner, tablename, distinctvalues, pagecount, pagecount*8 size_KB
from optimizerstatistics
where columnname ='TABLE STATISTICS'
BUT: this one is just to see table sizes (no indexes!) and it does NOT cover LONG/LOB columns.
If you want to cover these as well, you need to query TABLESTATISTICS and INDEXSTATISTICS.
But be VERY carefull with these tables, as they perform a full scan of the table you want to query the data for at the moment when you run the query.
So if the table is rather large, you will create lots of I/O.
regards,
Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.