on ‎2011 Jul 26 10:56 AM
What is the best way to determine which tables are the culprits in a large (disk size) database.
We put out the same basic structure of tables to our customers and some databases end up much bigger than others. My initial attempts to determine where the size is used were to check the row counts for each table, but I do not think I am doing that as efficiently as I could, going table by table. But a higher row count does not necessarily mean more space on the disk if another lower row count table is storing more data.
I also checked in Sybase Central the Fragmentation for the tables with the most main pages, as well as the %File column of Page Usage which I assume means the % of the database file that table uses.
So I thought I would ask if there is a more efficient, more accurate way to tell which tables were taking up the most disk space within the database file.
Request clarification before answering.
select table_page_count+ext_page_count as totalpages, table_name from systable order by totalpages desc
The table using the most db pages will be on top 😉
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.