Space allotment
Posted in 2004
Topics: Storage & Space Management, SQL Development & Query Writing
Hi,
I have run the following script to provide the size of a table in pages.
Would this size include that of all indexes on the table? If not, how could
I get the disk space taken by all indexes?
database sysmaster;
select dbsname,
tabname,
count(*) num_of_extents,sum( pe_size ) total_size
from systabnames, sysptnext
where partnum = pe_partnum and
tabname not matches "sys*" and
dbsname='test' and
tabname='table1'
group by 1, 2
order by 3 desc, 4 desc;
Thank you,
Tony
Hey, I actually received an IDS list!!
Welcome back?!?
Just so you all know, we (IIUG) tried to replace sendmail and obviously
it did not go well.
The news lists just were not working well, and we had difficulties
fixing it.
Last night, we declared defeat and put sendmail back in play.
Sorry for the problems.
Sam
-----Original Message-----
From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org] On
Behalf Of Demeis, Tony
Sent: Tuesday, October 26, 2004 11:46 AM
To: ids@iiug.org
Subject: Space allotment [3566]
Hi,
I have run the following script to provide the size of a table in pages.
Would this size include that of all indexes on the table? If not, how
could I get the disk space taken by all indexes?
database sysmaster;
select dbsname,
tabname,
count(*) num_of_extents,sum( pe_size ) total_size
from systabnames, sysptnext
where partnum = pe_partnum and
tabname not matches "sys*" and
dbsname='test' and
tabname='table1'
group by 1, 2
order by 3 desc, 4 desc;
Thank you,
Tony
Tony In the case of attached indexes yes, but if you have detached indexes then no, you would need to change the tabname to the index name. Keith -> -----Original Message----- -> From: Demeis, Tony [mailto:Tony.Demeis@moh.gov.on.ca] -> Sent: Tuesday, October 26, 2004 4:46 PM -> To: ids@iiug.org -> Subject: Space allotment [3566] -> -> -> Hi, -> -> I have run the following script to provide the size of a -> table in pages. -> Would this size include that of all indexes on the table? -> If not, how could -> I get the disk space taken by all indexes? -> -> -> database sysmaster; -> -> select dbsname, -> tabname, -> count(*) num_of_extents, -> sum( pe_size ) total_size -> from systabnames, sysptnext -> where partnum = pe_partnum and -> tabname not matches "sys*" and -> dbsname='test' and -> tabname='table1' -> -> group by 1, 2 -> order by 3 desc, 4 desc; -> -> -> Thank you, -> Tony -> ******************************************************************************** ** This message is sent in strict confidence for the addressee only. It may contain legally privileged information. The contents are not to be disclosed to anyone other than the addressee. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. This footnote also confirms that this email message has been swept for the presence of computer viruses, however we cannot guarantee that this message is free from such problems. ******************************************************************************** **