Fwd: Sizes of Tables (Fragmented or Not) and Indices (Attached or Not,
Posted in 2005
Topics: Storage & Space Management, SQL Development & Query Writing, Stored Procedures & SPL, Server Administration, Migration, Import/Export & Data Conversion
Still looking for that one miracle script ... :)
I have also found this amongst my script library ... dated 4/25/1999:
#!/usr/bin/ksh
DB=$1
echo "Unloading data to $DB.size"
dbaccess $DB <<EOF
unload to "$DB.size"select
CASE when indexname is not null then indexname
else t.tabname
end
,fragtype,f.dbspace,f.nrows,f.npused
from sysfragments f, systables t
where f.tabid = t.tabid
order by 1,2
EOF
Take care.
Clifton
"Clifton M. Bean" <cmbean@sbcglobal.net> wrote:
Date: Fri, 4 Mar 2005 08:17:54 -0800 (PST)
From: "Clifton M. Bean"
Subject: Fwd: Sizes of Tables (Fragmented or Not) and Indices (Attached or
Not, Fragmented or Not)
To: Informix Email List , SAPMIX
Oh, I have this for some of it ...
-----------------------------------------------------------------------------
-- Module: @(#)tabextent.sql 1.4 Date: 97/07/18
-- Author: Lester B. Knutsen Email: lester@advancedatatools.com
-- Advanced DataTools Corporation
-- Discription: Displays tables, number of extents and size of table.
-----------------------------------------------------------------------------
database sysmaster;
select dbsname,
tabname,
count(*) num_of_extents,sum( pe_size ) total_size
from systabnames, sysptnext
where partnum = pe_partnum
group by 1, 2
order by 1, 2
"Clifton M. Bean" <cmbean@sbcglobal.net> wrote:
Date: Fri, 4 Mar 2005 08:06:50 -0800 (PST)
From: "Clifton M. Bean"
Subject: Sizes of Tables (Fragmented or Not) and Indices (Attached or Not,
Fragmented or Not)
To: Informix Email List , SAPMIX
Does anyone have any one or multiple scripts that will output that type of
information, in pages or KB, for a specified database or for an entire
instance?
I know .... I know ... asking for a miracle here but just thought I'd ask for
a little help from my friends :)
Thanks in advance.
Clifton
Hi Clifton,
I am using this part of a script to get the table size....over 25Gb
# Table size greater than 25Gb
dbaccess sysmaster <<EOF
set isolation to dirty read;
set lock mode to wait;output to $TEMPFILE1
select tabname,(npused*2) size from sysptprof,sysptnhdr
where sysptprof.partnum = sysptnhdr.partnum and (npused*2)>25000000
order by 2 desc;EOF
-----Original Message-----
From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org] On
Behalf Of Clifton M. Bean
Sent: Friday, March 04, 2005 11:51 AM
To: ids@iiug.org
Subject: Fwd: Sizes of Tables (Fragmented or Not) and Indices (Attached
or Not, Fragmented or Not) [4410]
Still looking for that one miracle script ... :)
I have also found this amongst my script library ... dated 4/25/1999:
#!/usr/bin/ksh
DB=$1
echo "Unloading data to $DB.size"
dbaccess $DB <<EOF
unload to "$DB.size"select
CASE when indexname is not null then indexname else t.tabname end
,fragtype,f.dbspace,f.nrows,f.npused
from sysfragments f, systables t
where f.tabid = t.tabid
order by 1,2
EOF
Take care.
Clifton
"Clifton M. Bean" <cmbean@sbcglobal.net> wrote:
Date: Fri, 4 Mar 2005 08:17:54 -0800 (PST)
From: "Clifton M. Bean"
Subject: Fwd: Sizes of Tables (Fragmented or Not) and Indices (Attached
or Not, Fragmented or Not)
To: Informix Email List , SAPMIX
Oh, I have this for some of it ...
------------------------------------------------------------------------
-----
-- Module: @(#)tabextent.sql 1.4 Date: 97/07/18
-- Author: Lester B. Knutsen Email: lester@advancedatatools.com
-- Advanced DataTools Corporation
-- Discription: Displays tables, number of extents and size of table.
------------------------------------------------------------------------
-----
database sysmaster;
select dbsname,
tabname,
count(*) num_of_extents,sum( pe_size ) total_size
from systabnames, sysptnext
where partnum = pe_partnum
group by 1, 2
order by 1, 2
"Clifton M. Bean" <cmbean@sbcglobal.net> wrote:
Date: Fri, 4 Mar 2005 08:06:50 -0800 (PST)
From: "Clifton M. Bean"
Subject: Sizes of Tables (Fragmented or Not) and Indices (Attached or
Not, Fragmented or Not)
To: Informix Email List , SAPMIX
Does anyone have any one or multiple scripts that will output that type
of information, in pages or KB, for a specified database or for an
entire instance?
I know .... I know ... asking for a miracle here but just thought I'd
ask for a little help from my friends :)
Thanks in advance.
Clifton
Related threads
- the longer you surf, the MORE $$$ you earn !!
- Store procedure
- emulation for Vt100
- extent size questions again ...