Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

progress datatype for large integer values

Status
Not open for further replies.

oskhan

Technical User
Sep 26, 2005
23
US
hi
I was wondering if anyone could tell me what is the best data type in progress for a field that is part of the primary key which might quickly reach 2 billion records.

My table as follows
note_id (int), seq(int), text[4](char[80])

the primary key is note_id + seq. I will mostly be performing lookups based on note_id. however I want to design it in such a way that note_id is not limited by the domain of an integer(2 billion something).

could anyone suggest what might be the best solution? should I use decimal type instead? or should I design this table so that it has 2 note_ids (thereby gaining the ability to refer to upto 2billion x 2 billion records). I know someone with more experience must have faced this issue before and I hope I can get some guidance.

thanks
oskhan

PS: is it even a good idea to design the db to have so many records in it?

 
It depends on your version of Progress. A new data type INT64 was introduced with Version 10.2 For earlier versions, use a DECIMAL with zero decimal places. To generate big numbers, use 2 sequences - one for the left hand and one for the right. Calculate the number using DECIMAL variables.

No problem with design as long as you're properly indexed.

Cheers, Mike.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top