[JBoss JIRA] Resolved: (TEIID-142) Introduce a mechanism to allow single source updates without an xa txn.
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-142?page=com.atlassian.jira.plugin.... ]
Steven Hawkins resolved TEIID-142.
----------------------------------
Fix Version/s: (was: 9.0)
Resolution: Out of Date
I'm going to mark this issue as out of date. See http://community.jboss.org/wiki/Multiple1PC for resolutions when using one or more 1PC resources under a transaction.
There is still an issue here, which would be to specifically force non-XA behavior for performance - such as 1PC cross source read / write or multiple reads/updates (which could be something like "BEGIN ATOMIC <translator name>") to the same source in a procedure. An issue along those lines can be logged when needed.
> Introduce a mechanism to allow single source updates without an xa txn.
> -----------------------------------------------------------------------
>
> Key: TEIID-142
> URL: https://issues.jboss.org/browse/TEIID-142
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 9.x
> Reporter: Steven Hawkins
> Priority: Minor
>
> Defect Tracker #24910: txnAutoWrap = OFF in 5.5 disables the use of local transactions. This was primarily done to support customers who 1. weren't paying for the transactional product
> 2. weren't using an XA connection for an update
> The concern of 1 goes away in 5.6 as all customers will have a transactional product. The secondary concern requires either a connection property that either ignores autocommit or the generic support of 1 phase commit on connectors supporting update and local transactions. The latter solution would allow non-XA aware connectors to seem XA aware as long as all updates went to a single source. Arjuna would also need to be configured to support the one phase commit optimization.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Issue Comment Edited: (TEIID-1726) Requesting ability to add/use Oracle hints in EDS
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-1726?page=com.atlassian.jira.plugin... ]
Steven Hawkins edited comment on TEIID-1726 at 8/29/11 4:45 PM:
----------------------------------------------------------------
based on your comments the refined set of options are:
- targeted use of native query features, see TEIID-669. Now that designer has flexible extension metadata, its quite easy for us to add handling for source procedures/views where the native sql is defined in designer. However any hints in the sql would always be applied and not contextually. Exposing source procedures allowing for dynamic sql (like what is done for MDX) could also be done, but that breaks all abstraction and would not integrate well.
- add support for the multi-hint comment container (alternative option #2 above). Unless some other syntax was used to separate the hints, a parsing change would be needed to support nested comments (see below). And without additional considerations, this would be non-positional in the source sql, so it really only applies to Oracle style hints. SQL Server, db2, mysql, Teiid, etc. make use of positional/syntax related hints. Referencing columns/tables as they appear in the user query would also add difficulty since we would have to introduce some escape syntax then parse/update the hint once the source query is planned - e.g. SELECT /\*+ sh my-oracle:/\*+LEADING(@BAL@) ALL_ROWS\*/ \*/ ...
- implement TEIID handling for LEADING/ALL_ROWS (although the specifics of how tables/views are referenced would take more thought) as they are relevant for EDS queries (although our latency/processing tradeoff in union processing is fairly effective), and add pushdown propagation for the hints. As you point out this of course lacks generality.
- instead of using Java to customize translators, make use of something akin to DB2 optimization profiles, which has some tie in to alternative option #2/#3. The translator could be configured with a file that describes hint application. The most simplistic rules could just match the entire query or be regular expression matching the source query, e.g.:
<rule match="SELECT (.\*) FROM BAL (.\*) UNION SELECT (.\*)" replace="SELECT /\*+ALL_ROWS\*/ $1 FROM BAL $2 UNION SELECT $3"/>
The tie to #2/#3 would be to take advantage of additional metadata / and or allow for the user to drive the hint application:
<rule user_hint="loop" match="INNER JOIN" replace="INNER LOOP JOIN"/>
which could handle simplistic application of SQL Server loop join hints (assuming that the translator was configured to expect ANSI FROM clauses), e.g.:
SELECT /\*+ sh my-ssql:/+\*loop\*/ \*/ ...
The benefit here is that this doesn't require breaking any abstraction and can be done on an as needed basis without modifying vdbs or the client application, but it could be brittle and there are still a lot of details left out here, such as rule precedence, rule file format, etc.
was (Author: shawkins):
based on your comments the refined set of options are:
- targeted use of native query features, see TEIID-669. Now that designer has flexible extension metadata, its quite easy for us to add handling for source procedures/views where the native sql is defined in designer. However any hints in the sql would always be applied and not contextually. Exposing source procedures allowing for dynamic sql (like what is done for MDX) could also be done, but that breaks all abstraction and would not integrate well.
- add support for the multi-hint comment container (alternative option #2 above). Unless some other syntax was used to separate the hints, a parsing change would be needed to support nested comments (see below). And without additional considerations, this would be non-positional in the source sql, so it really only applies to Oracle style hints. SQL Server, db2, mysql, Teiid, etc. make use of positional/syntax related hints. Referencing columns/tables as they appear in the user query would also add difficulty since we would have to introduce some escape syntax then parse/update the hint once the source query is planned - e.g. SELECT /*+ sh my-oracle:/*+LEADING(@BAL@) ALL_ROWS*/ */ ...
- implement TEIID handling for LEADING/ALL_ROWS (although the specifics of how tables/views are referenced would take more thought) as they are relevant for EDS queries (although our latency/processing tradeoff in union processing is fairly effective), and add pushdown propagation for the hints. As you point out this of course lacks generality.
- instead of using Java to customize translators, make use of something akin to DB2 optimization profiles, which has some tie in to alternative option #2/#3. The translator could be configured with a file that describes hint application. The most simplistic rules could just match the entire query or be regular expression matching the source query, e.g.:
<rule match="SELECT (.*) FROM BAL (.*) UNION SELECT (.*)" replace="SELECT /*+ALL_ROWS+/ $1 FROM BAL $2 UNION SELECT $3"/>
The tie to #2/#3 would be to take advantage of additional metadata / and or allow for the user to drive the hint application:
<rule user_hint="loop" match="INNER JOIN" replace="INNER LOOP JOIN"/>
which could handle simplistic application of SQL Server loop join hints (assuming that the translator was configured to expect ANSI FROM clauses), e.g.:
SELECT /*+ sh my-ssql:/+*loop*/ */ ...
The benefit here is that this doesn't require breaking any abstraction and can be done on an as needed basis without modifying vdbs or the client application, but it could be brittle and there are still a lot of details left out here, such as rule precedence, rule file format, etc.
> Requesting ability to add/use Oracle hints in EDS
> -------------------------------------------------
>
> Key: TEIID-1726
> URL: https://issues.jboss.org/browse/TEIID-1726
> Project: Teiid
> Issue Type: Feature Request
> Components: Server
> Affects Versions: 7.4.1
> Reporter: Debbie Steigner
>
> Requesting the ability to use Oracle hints inside virtual transformations and enduser queries in EDS and Teiid Designer
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month