But why use temporary tables at all? It seems like their session-private-ness is the source of your wanting to reuse the connection. If you were using real tables, your reports could just commit the data and thus make them available to other sessions...?
On Mon, Jun 8, 2020 at 7:09 PM Thorsten Schöning <[email protected]> wrote: > Guten Tag Lukas Eder, > am Montag, 8. Juni 2020 um 17:41 schrieben Sie: > > > Yes, it seems to me there's something fishy here. What you seem to want > to > > do is some asynchronous service that caches data in some particular > cases. > > Things are easier than it might read: Consider ONE SOAP-request > containing the commands to render THREE different reports: rep1, rep2, > rep3. rep1 and rep2 are totally unrelated, rep3 is based on the data > of rep1. > > There's currently no way to model dependencies and stuff between those > reports, I simply only know that some are based on each other's data > and that is hard-coded were necessary. So the implementation of rep3 > executes data-retrieving of rep1 and does a bit more. > > To not need to rexecute the query of rep1 entirely always, it simply > creates a temporary table and fetched from that. When executed because > of rep3, that way results are instantly available. But this only works > if one and the same connection is reused, because temporary tables are > session-private. > > Because rep2 is totally unrelated to all other reports, it would be > best to execute that in parallel with processing of all other reports. > Because of the temp-table-approach I need to keep the same > JDBC-connection, because I can't know if rep2 is totally unrelated or > based on rep1 as well etc. > > So I've researched a bit on that topic and came to the conclusion that > this should work. Now I know that because of synchronization in > JDBC-drivers it might not be as performant as expected, but that's > different from that it's not supposed to work at all. :-) > > While you are not the only one telling so, others thought of the same > approaches like I had in mind and their tests succeeded as well. > Besides the performance aspect of course. So I wonder what is correct, > does/should it work or not. > > I'm confused... > > Mit freundlichen Grüßen, > > Thorsten Schöning > > -- > Thorsten Schöning E-Mail: [email protected] > AM-SoFT IT-Systeme http://www.AM-SoFT.de/ > > Telefon...........05151- 9468- 55 > Fax...............05151- 9468- 88 > Mobil..............0178-8 9468- 04 > > AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln > AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jooq-user/1811714249.20200608190925%40am-soft.de > . > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO7SZY558jhOMJv5Bas0jgeuH43R7khysWFp0GrDw6ZQwQ%40mail.gmail.com.
