[
https://issues.jboss.org/browse/TEIID-196?page=com.atlassian.jira.plugin....
]
Steven Hawkins commented on TEIID-196:
--------------------------------------
I think it's best to not address the ease of use for a teiid temporary table for the
8.3 release. The most likely usage pattern to replace an internal temporary table would
look like:
{code}
//- create the source table
source.native("CREATE [GLOBAL] TEMPORARY TABLE name IF NOT EXISTS ON COMMIT [DELETE
ROWS | DROP]");
//- bring the table into Teiid
CREATE FOREIGN TEMPORARY TABLE name ...
//- use the table
{code}
For this to be correctly handled with a GLOBAL temporary table, the table name would need
to be unique or the GLOBAL / table definition would need to be the same for all sessions
with session specific data scoping (such as Oracle) - or the source would need to support
session scoped temporary tables (such as PostgreSQL). It would also need to be accessed
under a transaction so that:
* the on commit behavior could ensure clean-up - as a Teiid drop is not guaranteed to
occur (in some exception cases, loss of db connectivity, hard shutdown, etc.)
* the source pool when using track connections by transaction will ensure that multiple
uses of that source by Teiid will use the same connection/session and thus the same
temporary table/data.
Support creation of temp tables on physical sources.
----------------------------------------------------
Key: TEIID-196
URL:
https://issues.jboss.org/browse/TEIID-196
Project: Teiid
Issue Type: Feature Request
Components: Connector API, Query Engine
Affects Versions: 6.0.0
Reporter: Ken Johnson
Assignee: Steven Hawkins
Fix For: 8.3
This is a multi-part request.
First, the system should support creation of temporary tables using a physical backing
store rather than buffer manger. Given multi-pass SQL's heavy use of temp tables,
buffer manager can easily be overloaded with large interim results stored in temp tables.
Second, this should be a user-configurable behavior. For example, user might be able to
choose a system-level or session-level default from among:
-- memory/cache
-- a source represented by a connector binding
-- a distinct temp source defined with it's own connection parameters (possibly
another schema in the repository DB instance)
Ideally default selectoin should be override-able at temp table creation time through a
DDL extension
In the case where multiple temp tables have been created on a source via connector, the
query planner should recognize this and leverage pushdown to the temp store when later
query passes access multiple temp tables.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira