Guten Tag Lukas Eder,
am Montag, 8. Juni 2020 um 19:39 schrieben Sie:

> 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...?

That's what others have suggested as well already, but I see two major
problems in my concrete setup: Report-stuff is work in progress and
changes fast, but my schema is manually maintained and versioned using
custom update-SQL and stuff. So it introduces quite some overhead,
which can be avoided by using temp-tables in code only.

Additionally, the calculated data is really only valid per session and
its associated transaction anyway. New requests with new sessions
might come to different results, so I would need to think of how to
maintain those different results in non-session-local tables, clean
things up at some point etc. This is a bit easier with temp-tables.

The better compromise might be to cache the results per request in
memory instead of in temp-tables, saving roundtrips to fetch it again
this way as well. I was only using temp-tables in some queries anyway
already and had the idea to reuse them as session-wide cache instead
of using memory therefore.

The idea of concurrently using the same JDBC-connection came only
afterwards, when adding reports which don't query the database at all.
Those can be processed multi-threading with reports which do query the
database in theory, but I currently don't know which report accesses
the DB when scheduling those. So it would be great if concurrent
access of JDBC would just work and I don't need to care too much. :-)

I'll think about this whole stuff, so thanks about your suggestions!

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/665673854.20200609092435%40am-soft.de.

Reply via email to