Database Cache | Teradata Studio/Studio Express - Database Cache - Teradata Studio

Teradata® Studio™ Express User Guide - 17.20

Product
Teradata Studio
Release Number
17.20
Published
September 2022
Language
English (United States)
Last Update
2022-09-23
dita:mapPath
ztp1648839236373.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2042
Product Category
Teradata Tools and Utilities
Use the Database Cache option to designate specific databases or users to be cached. A database cache file is created to store the metadata that describes information about the database, such as its tables, columns, constraints, indexes, macros, parameters, stored procedures, user-defined functions, user-defined types, and views. This metadata populates the Data Source Explorer and Transfer View views.
The Database Cache option is associated with the Connection Profile. Deleting a Connection Profile also deletes the Database Cache list and any database cache files that were created.

Database Cache Inheritance

If the Data Source Explorer Load option is set to show databases in hierarchical format, child databases and user objects are nested under the parent database or user object. When you select a database or user object to be cached, all of its child database and user objects are also cached. When you change the Data Source Explorer Load option, the database cache is deleted and then re-cached using the new selections.

Progress Monitor

When you first connect to the database and open the Databases folder, the database cache file is created in a background job. To view the progress of the database cache job:
  • Select Window > Show View > Other > General > Progress.
  • Click OK.
As a result of a behavioral change of Progress Monitor with Oxygen framework, the Preferences setting Always run in background is checked by default and Progress Monitor is minimized. To view the progress:
  1. Select Windows > Preferences.
  2. Select General.
  3. Clear the Always run in background check box.
  4. Click Apply and Close.

Display Query Start and Execution Time in Progress Bar

To track at what time query execution is started and from how much time query is executing, the start time and execution time appear in the progress bar in the following format:
  • StartTime: Start time of query execution in the format of HH:MM:SS (14:10:10)
  • ExecutionTime: Total time taken for query execution in the format of HH:MM:SS.MS (14:10:10.678)

Progress bar for executed query

The following table depicts how start time and execution time appears in progress bar for different scenarios.

Scenario Action
  • Single/Multiple Statements for Execute All/Execute Selected Text/Execute Selected Text as Single Statement/Execute Current Text
  • Single Statement execution with Execute as Individual Statement
For both Single and Multiple statements, this will be treated as single statement and all statements will be executed in single transaction. In this case, irrespective of count of statements, single transaction Start time and execution time will be displayed.
Multiple Statements Execution with Execute as Individual Statements Each statement will be processed in single transaction so, for each statement, start time and Execution time will be displayed. Once a statement execution completed, second statement start its execution at that time, start time and execution time will be re-initialized from start.
Parameterized queries While parameterized queries executing, after parameters input only, query start time and execution time will be displayed.
Export Results to File When Export Results to File is selected, then in this case, same behavior exists as specified previously. After statements execution completed, the status bar and progress dialog box will be updated with transfer progress details so at this time no change in existing behavior.
Execution canceled in Middle of Execution If statements execution canceled in middle, the progress dialog box and the progress window bar closes. This is existing functionality.

About Refreshing Cache

After the cache is created, click Refresh to load the cached databases from the database cache file. Cached databases are identified with the cache icon "" .

If new database objects are modified in the database while they are loaded from the database cache, the modified objects do not appear in the Data Source Explorer until you refresh the database cache. To refresh the database cache for a specific database, right-click the cached database and select "" . This action deletes the database cache file, launches a new background job to create a new database cache file, and refreshes the list of databases.

You can also refresh the database cache by deleting the database cache files in the Teradata JDBC Connection Properties dialog box. The Data Source Explorer shows any changes to the database objects. A subsequent refresh of the Databases folder loads the database from the database cache file.

Termination of Cache Job

Terminating the database cache job deletes the database cache files and databases to be loaded from the database metadata. To restart the database cache job, you must disconnect and reconnect the Connection Profile, then click the Databases folder to open and create the database cache files.