On Wed, May 1, 2024 at 12:54 PM Ahmed Ghanmi <[email protected]>
wrote:

> We are concerned that we'd end up with recurring performance issues on PG
> due to the casts. As a starting point will we have to rewrite indexes to
> account for the casts?
>

I'm not sure what you mean by this. Bind values are cast by jOOQ, yes. But
that doesn't affect query performance to my best knowledge. A bind value is
a constant expression, and a cast on a constant expression is still a
constant expression. Why do you think this is performance relevant?


> Will any index created in the future have to account fo them? Since on
> Oracle's end this won't be needed, different scripts for each dbms would
> beat our goal of becoming as DB agnostic as possible.
>

Eventually, you will have to think about the specifics of each of your
supported RDBMS, there's no way around that. There are definitely a few
differences that jOOQ can't or cannot easily abstract over, in terms of
behaviour (e.g. transactions), data types, etc.

But again, rather than thinking about generic and hypothetical cases, do
you have *specific* issues that you've encountered?


> The casts are hidden to the developer, how predictable are they ?  But say
> they weren't added, if a query is badly written and its castless
> translation is rendered pg-incompatible, the dev would from the start be
> aware of a casting issue and proceed to at least rewrite their oracle query
> to use an explicit cast. The casting will be visible and predictable.
>

jOOQ will always try to "make the SQL work." This may include casts, and
many other elements of emulation of features. The alternative to certain
bind value casts is a query that simply won't work on PostgreSQL.

But again, I doubt that this is an actual problem (performance or
otherwise).

Best Regards,
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO7sCiheoUVMpWMcjyV_e1GomHLjYsVWn9aYPJaoQz8sGQ%40mail.gmail.com.

Reply via email to