[
https://issues.jboss.org/browse/TEIID-2706?page=com.atlassian.jira.plugin...
]
Debbie Steigner commented on TEIID-2706:
----------------------------------------
Using VDB Execute in the Designer, you can see the hint coming thru, so
/*+ cache */ select * from bqt.SmallA
Shows it using the cache hint:
2013-10-21 07:22:29,923 DEBUG [org.teiid.PROCESSOR] CCeIPNy1zUVF.0 Using cache hint /*+
cache */
2013-10-21 07:22:29,923 TRACE [org.teiid.PROCESSOR] Adding to global/distributed cache
Cache Entry<CCeIPNy1zUVF=user@teiid-security> params:null sql:/*+ cache */ select *
from bqt.SmallA
2013-10-21 07:22:29,924 TRACE [org.teiid.BUFFER_MGR] Add batch to BufferManager 3 with
size estimate 83866
2013-10-21 07:22:29,924 DEBUG [org.teiid.PROCESSOR] [RequestWorkItem.sendResultsIfNeeded]
requestID: CCeIPNy1zUVF.0 resultsID: 16 done: true
2013-10-21 07:22:29,925 DEBUG [org.teiid.TRANSPORT] send message: MessageHolder: key=35
contents=ResultsMessage rowCount=50 finalRow=50
But then when I rerun the same query: /*+ cache */ select * from bqt.SmallA
It shows it hitting the cache, but it returns 0 rows.
2013-10-21 07:22:43,356 TRACE [org.teiid.PROCESSOR] Cache hit for Cache
Entry<QJa3VEi6VZAC=user@teiid-security> params:null sql:/*+ cache */ select * from
bqt.SmallA
2013-10-21 07:22:43,356 TRACE [org.teiid.PLANNER.RESOLVER] Resolving command /*+ cache */
SELECT * FROM bqt.SmallA
2013-10-21 07:22:43,356 DEBUG [org.teiid.PROCESSOR] [RequestWorkItem.sendResultsIfNeeded]
requestID: QJa3VEi6VZAC.0 resultsID: 16 done: true
2013-10-21 07:22:43,356 DEBUG [org.teiid.TRANSPORT] send message: MessageHolder: key=41
contents=ResultsMessage rowCount=0 finalRow=0
Cache hint for resultset cache in user query doesn't work
---------------------------------------------------------
Key: TEIID-2706
URL:
https://issues.jboss.org/browse/TEIID-2706
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.7.7
Reporter: Debbie Steigner
Assignee: Steven Hawkins
I enabled TRACE logging and Command Logging to see if the Resultset Cache was being used
on my queries. If I use the ResultSetCacheMode=true on connection string you can see
Teiid using the cache instead of pulling from source again:
This is displayed the first time the query is run, it's loading the Cache:
2013-10-18 07:17:52,951 TRACE [org.teiid.PROCESSOR] Adding to global/distributed cache
Cache Entry<tR+M2n5wIwzI=bqt2@teiid-security> params:null sql:select * from SmallA
This displays the subsequent times the same query is run and you will not see source
queries:
2013-10-18 07:19:21,115 TRACE [org.teiid.PROCESSOR] Cache hit for Cache
Entry<tR+M2n5wIwzI=bqt2@teiid-security> params:null sql:select * from SmallA
But if I remove the connection string and just try using the Cache Hint /*+ cache*/ you
see nothing in the logs in regards to the Cache loading or being used on the second query,
you still see Teiid pulling the results from the source.
--
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