How to use declarative Partitioning of PostgreSQL with jOOQ?

118 views
Skip to first unread message

Thorsten Schöning

unread,
Dec 21, 2020, 5:23:15 AM12/21/20
to jOOQ User Group
Hi all,

I'm investigating about if and how to use partitioned tables with
PostgreSQL and jOOQ. I've already found an older blog post[1] using an
approach based on inheritance. Though, I would like to avoid workign
with intividual partitions and only with the partitioned table itself
instead. From my understanding that should be possible using
declarative partitioning with PostgreSQL 10+.

https://www.postgresql.org/docs/10/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE

I'm not sure how to use that with jOOQ, though. I don't need any
management of the partitioned table or the individual partitions with
jOOQ currently. Such things are handled in plain SQL files currently
outside the app itself. The only thing I need is INSERT, SELECT and
UPDATE.

Am I correct that with jOOQ, I simply would do those operations with
the partitioned table itself and Postgres would handle everything else
in the background?

Am I correct that I even could exclude the individual partitions from
jOOQs code generator at all? Or is there somethin in jOOQ requring to
know about the partitions I'm not aware of?

Thanks!

[1]: https://blog.jooq.org/tag/partitioning/

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning
AM-SoFT IT-Service - Bitstore Hameln GmbH

E-Mail: Thorsten....@AM-SoFT.de
Web: http://www.AM-SoFT.de/

Telefon: 05151- 9468-55
Fax: 05151- 9468-88
Mobil: 0178-8 9468-04

Firmensitz: Bitstore IT-Consulting, Frankfurter Allee 285, 10317 Berlin
Steuernummer 037/230/30566, HR 27198, Amtsgericht Potsdam Geschäftsführer Janine Galonska

Lukas Eder

unread,
Dec 21, 2020, 5:50:57 AM12/21/20
to jOOQ User Group
Hi Thorsten,

That blog post was written by a third party.

I'm not sure what needs to be done to get jOOQ to work with PostgreSQL (or Oracle) partitions. We'll support them in the future:


So far, we haven't investigated this feature and how it interacts with jOOQ yet, so I can't give you an authoritative answer as of now.

In Oracle, to my understanding, you don't have to do anything specific to run DML on partitioned tables (logically. Though some tweaks may be required for occasional performance impact).

I hope this helps,
Lukas

--
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 jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/202174996.20201221112309%40am-soft.de.
Reply all
Reply to author
Forward
0 new messages