-
1. Re: Continuous Executions and INSERT INTO... SELECT...
shawkins Mar 27, 2012 3:20 PM (in response to markaddleman)The whole query is treated as continuous. You would end up reexecuting the insert after it completes. Each one would be treated as a descrete insert. To control insert batching you could do that in your client by just submitting the SELECT a,b,c FROM translator_b.t and then batching the rows on the client side in your asynch handler.
If you need hints you'll use the new source hint construct, which can pass hints from the client query to the translator - e.g. SELECT /*+ sh:'commit_every_n(1000)' */ ..., but also check out there is already a MaxPreparedInsertBatchSize for JDBC.
Steve
-
2. Re: Continuous Executions and INSERT INTO... SELECT...
markaddleman Mar 27, 2012 3:35 PM (in response to shawkins)Thanks, Steve. The examples I've seen for source hints are all on SELECT statements. Can I pass source hints to INSERT statements, too?
-
3. Re: Continuous Executions and INSERT INTO... SELECT...
shawkins Mar 27, 2012 3:52 PM (in response to markaddleman)Yes they should be recognized there too.
-
4. Re: Continuous Executions and INSERT INTO... SELECT...
shawkins Apr 12, 2012 1:19 PM (in response to shawkins)I need to correct myself, the initial implemenation does not allow for updates in continuous mode. Only queries that return resultsets. Do you envision needing continuous updates that are performed server side?
Steve
-
5. Re: Continuous Executions and INSERT INTO... SELECT...
markaddleman Apr 12, 2012 10:59 PM (in response to shawkins)Just to be clear, we're talking about INSERT INTO...SELECT... forms right? If so, we don't need that since we can pretty easily create the same functionality in application code. The only advantage I can see to Teiid supporting this functionality is push down when the insert table is in the same data source as the select. That's very unlikely in our situation.
-
6. Re: Continuous Executions and INSERT INTO... SELECT...
shawkins Apr 13, 2012 9:07 AM (in response to markaddleman)Yes I mean INSERT or any other statement returning an update count. The logic currently expects the statement to return a result set.
Steve
-
7. Re: Continuous Executions and INSERT INTO... SELECT...
markaddleman Apr 13, 2012 9:10 AM (in response to shawkins)Ok. I don't see this as a problem. We would only use INSERT INTO...SELECT... and it would only be a convenience.