What is in my dbspace
Posted in 2004
Topics: Storage & Space Management
I have 2 dbspaces that I am concerned about. Both are loosing about 2-4% freespace in 2 months. This isn't a steady loss, I have been graphing the usage over the past year and for these two dbspaces the graph looks like a down hill staircase. I cannot find any tables that are using these dbspaces. What could possibly be in them? At this rate one of them will run out of space at the end of 2004. sending to informix-list
Try oncheck -pe. This will report the contents of all dbspaces/chunks.
"Phillips, Rob" <RPhillips@ce-a.com> wrote in message news:<bthna0$1h1$1@terabinaries.xmission.com>...
> I have 2 dbspaces that I am concerned about. Both are loosing about
> 2-4% freespace in 2 months. This isn't a steady loss, I have been
> graphing the usage over the past year and for these two dbspaces the
> graph looks like a down hill staircase. I cannot find any tables that
> are using these dbspaces. What could possibly be in them? At this rate
> one of them will run out of space at the end of 2004.
>
> sending to informix-list
A simple query I use a lot is like this:
database sysmaster;select hex(dbsnum) hexdbsnum, name
from sysdbspaces
into temp tt_dbspaces;
select hex(partnum) hexpartnum, dbsname, tabname
from systabnames, systabinfo --- <=== For fragmented tables
where partnum = ti_partnum
into temp tt_tables;
select name dbspacename, dbsname database, tabname
from tt_dbspaces, tt_tables
where hexdbsnum[8,10] = hexpartnum[3,5]
order by 1,3,2; --- <=== This keeps fragmented tables together
You may (will) want to do some filtering to get rid of temp tables,
system catalog tables etc. and to only get tables for the database or
dbspace you're interested in. You can also select columns from
sysdbspaces to show if it's a blobspace or a tempspace, if it's
mirrored, chunk sizes and so on; and rowsize, number of cols, number
of rows, number of extents first and next sizes, pages used from
systabinfo.
Unforunately, you can't get the fragmentation expression out (as far
as I can see so far.........)
The sysmaster is a HELL of a useful database when you get into it!
Cheers
Malc