Salesforce

What are the maximum number of records that can be stored in a TEMP-TABLE?

« Go Back

Information

 
TitleWhat are the maximum number of records that can be stored in a TEMP-TABLE?
URL NameP95826
Article Number000149454
EnvironmentProduct: Progress
Version: 9.1x
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
What are the maximum number of records that can be stored in a TEMP-TABLE?
Is there a limit for the number of records in a temp table?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The maximum number of records in a TEMP-TABLE depends on several factors, the most important of which is the record size.   The amount of session TEMP-TABLE data that will fit depends on the record size and the number of indexes.   

The following TEMP-TABLE records per block are hard coded and cannot be changed:

Block Size         Records Per Block
1 KB                      32 
4 KB                    256 
8 KB                    256 

Prior to OpenEdge 10.1x

Type I Storage Area structure is used for temp tables. The maximum size of the DBI file is 2 GB:

Total amount of space available for all session temp tables and their indexes is:
2 ^ 31 = 2147483648 (bytes)
(2 ^ 31) / (2 ^ 10) = 2 ^ 21 = 2,097,152 (1 KB blocks)

Assuming 32 records per block and 25% of the blocks are index blocks:
 
0.75 * (32 * 2097152) = 0.75 * (2 ^ 5 * 2 ^ 21)  = 0.75 * (2 ^ 26)  = 50,331,648 records.

OpenEdge 10.1x and later 

Type II Storage Area structure is used for temp tables. The maximum size of the DBI file is 1 TB.

The total amount of space available for all temp tables and their indexes is:
 
2 ^ 40 = 1099511627776 (bytes)
(2 ^ 40) / (2 ^ 10) = 2 ^ 30 = 1,073,741,824  (1 KB blocks)

Assuming 32 records per block and 25% of the blocks are index blocks:
 
0.75 * (32 * 1073741824) = 0.75 * (2 ^ 5 * 2 ^ 30) = 0.75 * (2 ^ 35)  = 25,769,803,776 records.




 
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:39 AM

Powered by