Re: npused in fragmented tables
Posted in 1997
And what version of Informix databases does this work on? It returns no rows found on both OnLine 7.10.UC1 on SCO Unix 3.2.4.2 and 7.12.UC1 on SCO Openserver 5.0.0d It would be a nice statement if it worked. Any ideas? settler@hobbes.dbintellect.com (Jeff Craig) wrote: :You could muck around $INFORMIXDIR/etc/sysmaster.sql to find out more :about the system table columns. Here is a sysmaster SQL statement :that I use to show allocated versus used pages in tables fragmented :across dbspaces. : :set isolation to dirty read; :select a.tabname as Table : ,c.name[1,10] as DBSpace : ,b.nptotal as PagesAllocated : ,b.npused as PagesUsed : ,(b.nptotal - b.npused) as PagesRemaining : ,trunc(((b.npused / b.nptotal) * 100)) as PctUsed : ,b.nrows as NbrRows : ,b.nextns as NbrExtents : ,b.fextsiz as FirstExtSize : ,b.nextsiz as NextExtSize : from sysptnhdr b : ,systabnames a : ,sysdbstab c :where c.dbsnum = trunc(b.partnum/1048576) : and b.partnum = a.partnum : and a.owner='dwadmin' :order by a.tabname : ,c.name :; : : :------------------------------------------------------------------- :Jeff Craig | dbINTELLECT Technologies, Inc. :Senior Consultant | Golden, CO : | (303) 275-6954 ext. 8008 : | email: settler@dbintellect.com : | fax: (303) 275-2134 :------------------------------------------------------------------- Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org