TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint...
-
Upload
ariel-bates -
Category
Documents
-
view
231 -
download
3
Transcript of TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint...
![Page 1: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/1.jpg)
TEMP-TABLE Performance Tuning & Other Important Stuff
Dan Foreman
Progress BravePoint
![Page 2: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/2.jpg)
Introduction- Dan Foreman
Progress user since 1984
This year is my 30 year anniversary with Progress
Guest Speaker at dozens of Progress Conferences 1990 until Today
![Page 3: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/3.jpg)
Dan Foreman Publications
Progress Performance Tuning Guide
Progress Database Admin Guide
Progress System Tables Guide
All updated through V11.3
Hope to have them in ePub and/or Kindle format in the next few months
![Page 4: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/4.jpg)
Who Are You?
Progress V6, V7, V8, V9, V10, V11
![Page 5: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/5.jpg)
Miscellaneous
Mobile phones on silent or vibrate please
TT = Temp Table
V11 = OE11
![Page 6: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/6.jpg)
To Do for Next TimeDoes monitoring EMPTY TEMP-TABLE “lie” about the number of records deleted?
Example showing dynamic temp-tables
Program to show all fields for the various “pseudo VSTs”
Why does tt-data1/3.p not show the dynamic TTs?
What are the mystery tables (count 2, peak 9) ????
Benchmark the overhead of turning on the TT monitors
![Page 7: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/7.jpg)
Before TT there were WORK-FILEs
100% Memory resident
No indexes
Record access is sequentialFIND FIRST > FIND LAST > FIND FIRST
Increasing the size of a record can be very expensive
Can potentially crash a system with three 4GL statements…….
![Page 8: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/8.jpg)
Temp-Table Basics
Similar to DB Tables
CRUD (Create, Read, Update, Delete)
Changes are not logged to the Before Image or After Image files
Subject to LBI activity unless NO-UNDO is used
Type 2 Storage “Areas”
No record locking
No latching (in DB shared memory)
![Page 9: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/9.jpg)
TEMP-TABLE Basics
TT data is written to a Client temporary file with a DBI prefix
DBI file is similar to a “real” DB but with no AI, BI, LG, LK files
Location of Client Temp Files can be set with –T parameter
Temp Files are hidden on Win & Unix Unix/Linux: -t
Windows: DIR /ah
![Page 10: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/10.jpg)
Emptying a TEMP-TABLE
EMPTY TEMP-TABLE tablename
Much faster than a Loop
![Page 11: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/11.jpg)
NO-UNDO
NO-UNDO on the TEMP-TABLE Definition
If NO-UNDO isn’t used, changes to TT inside of a transaction are logged to a Client Temp file with lbi prefix
![Page 12: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/12.jpg)
TT Startup Options
-tmpbsize – the block size used for the TT “database”
Client Startup Parameter
The default has changed more than once so we recommend setting it explicitly
-tmpbsize 8 recommended
-Bt – memory buffers for Temp-TablesClient Startup Parameter
Memory = (-Bt * -tmpbsize) * (# of Clients)
![Page 13: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/13.jpg)
Pre-V11 TT Monitoring Options
None – at least nothing that’s built in
Monitoring the size of the DBI file is about the only useful metric available
![Page 14: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/14.jpg)
V11 Delayed TT Instantiation
The app doesn't incur the overhead of instantiating a TT until it's actually referenced
The pre-V11 model instantiates all TT's when a new program is run, regardless of whether they are referenced or not
Use -nottdelay to revert to the old functionality
![Page 15: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/15.jpg)
Temp Table Logging
“The OpenEdge Logging Infrastructure has been enhanced so that application developers can trace the creation and deletion of temp-tables in their applications. This logging capability strengthens the ability to troubleshoot applications that utilize temp-tables and ProDataSets as their primary data structures.”
![Page 16: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/16.jpg)
VSTs for Temp Tables
“This ABL enhancement allows clients to gather information about the temp-tables used by the application via Virtual System Tables. These tables give the application access to database activity and status information, enabling an application to understand, debug, and tune the use of temp-tables within their application at runtime.”
![Page 17: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/17.jpg)
Progress.Database.TempTableInfo Class
“Provides information about a
temp-table and its indexes and provides static properties and methods for retrieving and archiving temp-table information for an ABL session”
![Page 18: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/18.jpg)
TempTableInfo Properties
ArchiveIndexStatistics
ArchiveTableStatistics
TempTableCount
TempTablePeak
![Page 19: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/19.jpg)
TempTableInfo Methods
GetIndexInfoByID()
GetIndexStatHistoryHandle( )
GetTableInfoByID( )
GetTableStatHistoryHandle( )
GetTableInfoByPosition( )
GetVSTHandle( )
![Page 20: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/20.jpg)
Starter CodeUSING Progress.Database.*.
Progress.Database.TempTableInfo:ArchiveTableStatistics = YES.Progress.Database.TempTableInfo:ArchiveIndexStatistics = YES.
![Page 21: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/21.jpg)
Instant ErrorCannot set Progress.Database.TempTableInfo:ArchiveTableStatistics (15247)
So you lookup Message# 15247:
“Update to the property or field is not allowed. This can happen if the given object only provides read-only access to the property based on its state.”
What ????
![Page 22: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/22.jpg)
V11 Client Startup Parameters
-ttbasetable
-tttablerangesizeDefault is 0; no statistics are recorded
Default for the DB –tablerangesize is 50
![Page 23: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/23.jpg)
V11 Client Startup Parameters
-ttbaseindex
-ttindexrangesizeDefault is 0; no statistics are recorded
Default for the DB –indexrangesize is 50
![Page 24: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/24.jpg)
Try Again
Using this .pf file
-ttbaseindex 1-ttindexrangesize 100-ttbasetable 1-tttablerangesize 100
![Page 25: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/25.jpg)
Progress.Database.VSTTableId Class
“Provides static properties that identity the VST for returning specific temp-table information for an ABL session”
![Page 26: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/26.jpg)
VSTTableId PropertiesActBufferId
ActIOTypeId
ActSpaceId
BuffStatusId
IndexStatId
TableStatId
UserIndexStatId
ActIndexId
ActOtherId
ActSummaryId
DbStatusId
MstrBlkId
TransId
UserTableStatId
ActIOFileId
ActRecordId
BlockId
FileListId
StatBaseId
UserIOId
![Page 27: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/27.jpg)
Demonstration
basic.p
tt2.p
tt-data1.p
![Page 28: TEMP-TABLE Performance Tuning & Other Important Stuff Dan Foreman Progress BravePoint dforeman@BravePoint.com.](https://reader036.fdocuments.net/reader036/viewer/2022062300/56649d825503460f94a681bf/html5/thumbnails/28.jpg)
Questions?
Questions?
Conference Evaluations
Thank You!
Contact:Dan Foreman
+1 541 908 3437 (but not right now please)