cancel
Showing results for 
Search instead for 
Did you mean: 

Blocks in sybase iq

Former Member
0 Kudos

Anyone explain me the difference between Physical Blocks, NBlocks and Catalog Blocks in Sybase iq.

Thanks,

Santosh Negalur

Accepted Solutions (0)

Answers (1)

Answers (1)

saroj_bagai
Contributor
0 Kudos

Physical block:  Data in IQ is organized inot pages which in turn are divided into a number of blocks. Smallest IO IQ perform is 1 block(block (physical block_

NBlocks: Number of blocks

Catalog block:  Block used by Catalog DB

Former Member
0 Kudos

Thank you Saroj.

Former Member
0 Kudos

How to calculate the size of database?

The value I am getting from sp_iqdbsize, Is the size of overall database?

Thanks in Advance

Santosh

tayeb_hadjou
Advisor
Advisor
0 Kudos

Hi Santosh,

I usually use "sp_iqstatus" which gives a good summary of database and server info including database total size allocated in blocks, number of blocks used and usage percent. It includes also IQ pages size, block size, etc.

Part of sp_iqstatus output :

Page Size:,131072/8192blksz/16bpp  /* page size : 131072 = 128 kb, Block size = 8192 = 8 kb */

Name, Value

' Main IQ Blocks Used:','11330 of 268800, 4%=88Mb, Max Block#: 1057106'

' Cache Dbspace IQ Blocks Used:','0 of 0, 0%=0Mb, Max Block#: 0'

' Shared Temporary IQ Blocks Used:','0 of 0, 0%=0Mb, Max Block#: 0'

' Local Temporary IQ Blocks Used:','97 of 38400, 0%=0Mb, Max Block#: 11345'

' Main Reserved Blocks Available:','12800 of 12800, 100%=100Mb'

' Shared Temporary Reserved Blocks Available:','0 of 0, 0%=0Mb'

The value 268800 is total IQ blocks allocated (free and used) to database.

The value 11330 is the number of blocks used and it should be the same as PhysicalBlocks in sp_iqdbsize.

To find the equivalent in KB, multiply #blocks by blcok size (8 KB in this example).

Regards,

Tayeb.

Former Member
0 Kudos

Hi Tayeb,

How to check catalog dbspace size?

tayeb_hadjou
Advisor
Advisor
0 Kudos

Catalog db size :  select db_property('FileSize') ;

FileSize: Returns the file size of the system(catalog) dbspace, in pages.

db_property('FreePages') : Returns the number of free pages in the system dbspace.

db_property( 'PageSize' ) :Catalog page size, in bytes.

Note that catalog dbspace file is autoextensible. It automatically grows as needed. Its limit is the file system size limit.

If no user tables created in the system dbspace,as recommended, then it should not grow much :

Catalog Store

Regards,

Tayeb.

Former Member
0 Kudos

Thank you Tayeb for your response.