Database

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

11-08-2018
06:45 AM

11-08-2018
06:45 AM

Hi

I am using this equation for predicting table growth. I am unsure how to use the roundup function described in the database design document. I have the values from DBS control.

Typical block size = ROUNDUP(MAX x 3/4, 512)

since in our environment we dont have DATABLOCKSIZE, i am using PERMDBSize which is 1024 sectors. I figured using the example for 15.10 database design document that 1 sector is 512 bytes so 1024 sectors is 524,288 bytes. If i plugin the values into the equation, I am unsure of the ROUNDUP function, does work like ROUND function in Teradata?

Typical block size = ROUNDUP(524288 x 3/4, 512)

Am I wrong all together?

Thanks,

Bijo

Solved! Go to Solution.

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

11-08-2018
05:34 PM

11-08-2018
05:34 PM

Since the MAX value 524,288 was a multiple of 2048 (512*4), the result of the division by 512 is an integer and ROUNDUP makes no difference for this case.

On the other hand, suppose your MAX were 523,776.

Then 3/4 of that would be 392,832 and dividing by 512 yields 767.25

In that case, CEILING returns 768 and the final answer would be 393,216 (not 392,832).

1 ACCEPTED SOLUTION

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

11-08-2018
07:36 AM

11-08-2018
07:36 AM

Re: Block Size equation

ROUNDUP(x,y) = CEILING(x/y)*y

This formula approximates the logical block size. If you have block-level compression enabled, then physical blocks will be smaller.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

11-08-2018
08:44 AM

11-08-2018
08:44 AM

Re: Block Size equation

Thank you Fred for reply.

but I am left with 'x' value if I plugin the values at the end that doesnt make sense to me.

CEILING(393216/512)*512

CEILING(768)*512 = 393216 bytes

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

11-08-2018
05:34 PM

11-08-2018
05:34 PM

Since the MAX value 524,288 was a multiple of 2048 (512*4), the result of the division by 512 is an integer and ROUNDUP makes no difference for this case.

On the other hand, suppose your MAX were 523,776.

Then 3/4 of that would be 392,832 and dividing by 512 yields 767.25

In that case, CEILING returns 768 and the final answer would be 393,216 (not 392,832).