Is your feature request related to a problem? Please describe.
In review of the retrieve_ts methods, there are up 5 loops over the data to handle various scenarios like datum conversions or versioned data. This adds up rather high.
Describe the solution you'd like
It is likely possible using a combination of Java and JOOQ query building to conditionally implement those loops in a more performant way using the AV_TSV table directly, or more likely AV_TSV_DQU to handle unit conversions.
Describe alternatives you've considered
Attempt to speed up retrieve_ts... I don't really see that happening, the design does make sense if you're stuck within PLSQL
Additional context
This would also allow for easier streaming of results for such things as a csv or json-lines format.
Is your feature request related to a problem? Please describe.
In review of the retrieve_ts methods, there are up 5 loops over the data to handle various scenarios like datum conversions or versioned data. This adds up rather high.
Describe the solution you'd like
It is likely possible using a combination of Java and JOOQ query building to conditionally implement those loops in a more performant way using the AV_TSV table directly, or more likely AV_TSV_DQU to handle unit conversions.
Describe alternatives you've considered
Attempt to speed up retrieve_ts... I don't really see that happening, the design does make sense if you're stuck within PLSQL
Additional context
This would also allow for easier streaming of results for such things as a csv or json-lines format.