Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
generated Identity-PK: BIGINT or DECIMAL(18)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Auryn

New User


Joined: 11 Jan 2006
Posts: 45
Location: Lower Saxony (DE)

PostPosted: Mon Jan 28, 2013 5:24 pm    Post subject: generated Identity-PK: BIGINT or DECIMAL(18)
Reply with quote

The tables for which I am responsible are defined with a generated identity-pk and most of them in Decimal(18) format.
What would you recommend, is better to use?
I suppose BigInt is similar to COBOL-Binary and Decimal is similar to COBOL-Display?
Than I guess BigInt requires much less storage space in table- and in indexspace as well.
Furthermore, I suspect that it's faster to compute new BigInt- than Decimal identities - similar to COBOL - because decimal values need to be converted in binary format.
Am I right? Do you agree with that?
Thanks a lot for your help
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Mon Jan 28, 2013 5:35 pm    Post subject: Reply to: generated Identity-PK: BIGINT or DECIMAL(18)
Reply with quote

You need to know whether DECIMAL would be "internal" (packed) or "external" (zoned).

Why do you believe that Cobol would change decimals to binary to do arithmetic? There are specific decimal-arithmetic machine instructions.

An 18-digit binary is enormously far from "faster" compared to an 18-digit packed-decimal, which I'd avoid using anyway, if possible, as 17 digits are "faster".
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Convert Decimal to hexadecimal Steve Ironmonger DFSORT/ICETOOL 5 Fri May 27, 2016 4:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us