Last Modified Date: 16 Aug 2016
Tableau creates temporary tables, also known as temp tables, to help improve performance and add functionality. Both Tableau Desktop and Tableau Server use temp tables to temporarily hold information specific to a connection. Tableau Server also uses temp tables to hold information specific to a user session.
Temp Table Creation
A temp table is created when a workbook is opened on Tableau Desktop or when a user signs in to Tableau Server and accesses a particular view. The temp table is stored in the temporary space of the database that the workbook or view is connected to and can be identified in the database by the #Tableau prefix. Temp tables can contain information about the connection or necessary to prepare the view. Examples include the following:
- Connection information to the data source – primarily to check for permissions
- Context filters, quick filters, top n filters, user filters, and other filters
- Data blending
Temp Table Removal
A temp table is deleted when a corresponding connection to the database gets closed if the user who opened the workbook has Delete permissions for the underlying data. This occurs when the workbook is closed on Tableau Desktop or when a connection on Tableau Server is inactive for a period of time and is removed from a pool of connections to allow room for other connections to open. If Tableau Desktop or Tableau Server is forced to close unexpectedly, the connection will be automatically closed and corresponding temp tables will get deleted from the database.
If needed, the creation of temp tables can be managed by restricting permissions in the database. However, restricting the creation of temp tables may have an in impact on the overall performance of the workbooks and views.
Temp Tables for Tableau Server VizQL Process
In addition to the temp tables that are created by default for each user session, the Tableau Server VizQL process creates temp tables because it also establishes connections to the database to load and render views. Because the connection to the database is based on a combination of properties, such as database type, database server, and database user name, some user sessions will share the VizQL process and therefore share the temp table.
For example, a temp table created by the VizQL process will be shared among multiple user sessions if the connection is made to a database on the same server and is being accessed by the same database user. However, the temp table will not be shared by multiple user sessions if any of these properties are different, such as the database user is different.
Note: The database user is different from the Tableau Server user.
Alternate Search Terms:temporary tables, #tableau