Need Count of Data Pages in Database
Posted in 2014
Topics: Platform-Specific Issues
Hi Folks, IDS 11.70.FC8 O/S AIX 6.1 I need to know how many data pages I have in my database taking into account 3 different page sizes. Does anyone have this sql readily available? IE, how many 4k data pages, how many 8k data pages, & how many 16k datapages I have. I do not want to know about index pages. TIA, Dan
select pagesize, sum(npdata)
from (
select d.pagesize, pt.npdata
from systables t, sysmaster:sysptnhdr pt, sysmaster:sysdbspaces d
where t.partnum = pt.partnum and t.partnum is not null and t.partnum
!= 0
and d.name = dbinfo( 'dbspace', t.partnum )
union
select d.pagesize, pt.npdata
from sysfragments t, sysmaster:sysptnhdr pt, sysmaster:sysdbspaces d
where t.partn = pt.partnum and t.partn is not null and t.fragtype = 'T'
and d.name = dbinfo( 'dbspace', t.partn) and t.partn != 0
)
group by 1
order by 1;
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Wed, Nov 12, 2014 at 1:29 PM, DAN MUELLER <ddmueller@intercall.com>
wrote:
> Hi Folks,
>
> IDS 11.70.FC8
> O/S AIX 6.1
>
> I need to know how many data pages I have in my database taking into
> account 3
> different page sizes. Does anyone have this sql readily available? IE, how
> many 4k data pages, how many 8k data pages, & how many 16k datapages I
> have. I
> do not want to know about index pages.
>
> TIA,
> Dan
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11c240662357390507ae64c1
That's for one database, run in that database.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Wed, Nov 12, 2014 at 2:27 PM, Art Kagel <art.kagel@gmail.com> wrote:
> select pagesize, sum(npdata)
> from (
> select d.pagesize, pt.npdata
> from systables t, sysmaster:sysptnhdr pt, sysmaster:sysdbspaces d
> where t.partnum = pt.partnum and t.partnum is not null and t.partnum> != 0
> and d.name = dbinfo( 'dbspace', t.partnum )
> union
> select d.pagesize, pt.npdata
> from sysfragments t, sysmaster:sysptnhdr pt, sysmaster:sysdbspaces d
> where t.partn = pt.partnum and t.partn is not null and t.fragtype => 'T'
> and d.name = dbinfo( 'dbspace', t.partn) and t.partn != 0
> )
> group by 1
> order by 1;
>
>
> Art S. Kagel, President and Principal Consultant
> ASK Database Management
> www.askdbmgt.com
>
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and do not reflect on the IIUG, nor any other organization with which I am
> associated either explicitly, implicitly, or by inference. Neither do
> those opinions reflect those of other individuals affiliated with any
> entity with which I am affiliated nor those of the entities themselves.
>
>
> On Wed, Nov 12, 2014 at 1:29 PM, DAN MUELLER <ddmueller@intercall.com>
> wrote:
>
>> Hi Folks,
>>
>> IDS 11.70.FC8
>> O/S AIX 6.1
>>
>> I need to know how many data pages I have in my database taking into
>> account 3
>> different page sizes. Does anyone have this sql readily available? IE, how
>> many 4k data pages, how many 8k data pages, & how many 16k datapages I
>> have. I
>> do not want to know about index pages.
>>
>> TIA,
>> Dan
>>
>>
>>
>>
*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
>
--001a11c3f5bc7ae7ab0507ae65d4