Salesforce

How does -Bt work with Temp-Tables?

« Go Back

Information

 
TitleHow does -Bt work with Temp-Tables?
URL Name20339
Article Number000120395
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
How the -Bt parameter works with temp-tables?
How the -tmpbsize works with temp-tables?
How much memory does the -Bt parameter take?
What block size do temp-tables use?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
How is -Bt used:
  • The -Bt parameter is a client startup performance parameter that specifies the size of the buffer pool to store temporary table records. 
  • The client uses single user database management code (-1, -i, and -Bt) to work with temporary tables. 
  • -Bt buffers are akin to the -B shared memory startup parameter for OpenEdge multi user databases except -Bt buffers are stored in process private memory and describe the static amount of memory private to each client. Blocks required to create the new objects are formatted directly into the -Bt (not written to disk right away). 
  • Only once the -Bt is filled are blocks paged out of memory to disk when new objects are created and the DBI file grows on disk as a result. 
  • If -Bt is defined high enough to fit all the temp-tables, then the DBI client temporary files are not used to store the temp-table records. Refer to Article  What are the maximum number of records that can be stored in a TEMP-TABLE?  
The default values for the number of blocks (-Bt) and the related block size has changed over releases:

Progress 9.0x and earlier:

The Temporary Tables Database (DBI) uses the default database block size of the client's platform, and the -Bt parameter uses the same unit:

If the client runs on WIN32, the -Bt allocation is made using 4 KB units;
On most UNIX systems, it uses 1 KB units.
Because the default database block size is 1, or 4 Kb depending on platform, 32 records per block are used to store the records in a temp-table data block.
 
Progress 9.1x up to 9.1D06 inclusive:
  • Temporary Tables Database (DBI) uses a database block size of 8Kb and 128 records per block on all platforms.
  • The unit for -Bt is left unchanged; the amount specified by -Bt is still multiplied by 4Kb on Win32 platforms, and by 1Kb on UNIX platforms; but the blocksize of the DBI file is 8Kb. The value is rounded down to the nearest 8Kb boundary.

Progress versions pre-9.1D06:
 
-Bt  WIN32 Kb   UNIX Kb
---  --------  --------
 10        40         8
 25        96        24
100       400        96
255      1016       248
 
Progress 9.1D07 and OpenEdge 10.x and higher:

A new client startup option was introduced that allows the block size of temporary tables to be specified: -tmpbsize:
  • Progress 9.1D07 the -tmpbsize value has two options; 1 and 8, which sets temp table block sizes of 1024 and 8192 respectively.
  • OpenEdge 10.1B the -tmpbsize value has three options;1, 4, and 8, which sets block sizes of 1024, 4096 and 8192 respectively:
-tmpbsize 1 (starting in OpenEdge 9.1D07)
-tmpbsize 4 (added in OpenEdge 10.1B)
-tmpbsize 8 (starting in OpenEdge 9.1D07)

The default -tmpbsize value is version dependent:
  • In OpenEdge 9.1D07 to 10.1A, the default is 1 Kb
  • In OpenEdge 10.1B, the default is 4 Kb from the prior default of 1 Kb.
  • Values other than 1, 4 or 8 will be accepted at start-up, but will be silently reset to either the 1, 4 or 8 default value.
  • When -tmpbsize is set to 1, the temporary tables database will store up to 32 records per block;
  • When -tmpbsize is set to 4 or 8, the temporary tables database will store up to 256 records per block.
  • TEMP-TABLE records per block are hard coded and cannot be changed
  • The DBI file itself utilizes Type II Storage Areas in OpenEdge 10 instead of a Type I Storage Area in Progress 9. Type II Storage Areas are comprised of clusters which are a contiguous allocation of space for one type of database object. As such the allocation of the DBI file uses 8 block clusters in OpenEdge 10 instead of single blocks, subsequently expect the DBI file to use more disk space (-tmpbsize x8) in OpenEdge 10.
Increasing the temptable blocksize will increase the amount initially allocated for temptables. The more temptables that are defined, the more memory/DBI space is used.

The default -Bt value is version dependent:
  • In Progress versions, up to 10.0B the default is -Bt 10.
  • In Progress version 10.1A onward the default is -Bt 255 and in addition uses the same unit as -tmpbsize, which is consistent with the -B database startup parameter which uses the database blocksize.

Examples:
 
    -Bt  -tmpbsize   Kb on all                         
setting    setting  platforms                          
-------  ---------  ---------                          
     10          1         10  ( 9.1D07 default values)
    255          1        255  ( 10.1A default values) 
    255          4       1020  ( 10.1B default values)
Workaround
Notes
References to Other Documentation:

OpenEdge Deployment, Startup Command and Parameter Reference:
https://docs.progress.com/bundle/openedge-startup-and-parameter-reference/page/Client-Startup-Commands.html
Keyword Phrase
Last Modified Date7/19/2022 2:22 PM

Powered by