Re:SQL is 43 years old – Here’s why we still use it today
by matwood on Tuesday May 02, 2017 @01:18PM
(#14248348)
> Do you hand-roll your own caching mechanism when just writing plain SQL?
Using something like jOOQ has meant I rarely need any caching, unlike Hibernate where caching almost seems required.
Re:SQL is 43 years old – Here’s why we still use it today
by mindcrime on Tuesday May 02, 2017 @01:22PM
(#14248399)
Interesting. I've never used jOOQ, but I'll give it a look. Hibernate has worked well for me, but I'm not dogmatic about it. Always interested to try new tools.
Re:SQL is 43 years old – Here’s why we still use it today
by matwood on Tuesday May 02, 2017 @01:39PM
(#14248600)
I've been writing SQL for almost 20 years, so the pain for me is the grunt mapping of data to and from. jOOQ does much of the grunt work of mapping, and lets me write typed SQL that it smartly translates to queries. More advanced features like various types of fetch make my job even easier.
https://www.jooq.org/doc/3.9/manual-single-page/#arrays-maps...
I wouldn't even know what metric to use to quantify that. Number of tables? On the order of hundreds, probably low hundreds... definitely not thousands.
It may just be that I've been lucky in that the data models I've worked with have been things that map well to using Hibernate. I will say that I haven't worked with a lot of data models where you need more than 3 or 4 joins in any given query. I know some people write far more complex queries than that, and maybe those are the kinds of scenarios that Hibernate doesn't handle well?
The problem with Hibernate is I have to learn all of these Hibernate quirks to maybe get decent speed out of a system, when I could have just written SQL and been done
Do you hand-roll your own caching mechanism when just writing plain SQL?