Sitemap
Javarevisited

A humble place to learn Java and Programming better.

Follow publication

From Hibernate Nightmares to JOOQ Dreams

The day we realized our ORM was gaslighting us

The Tuesday That Broke My Soul

“Why is this query taking 30 seconds?”

I’m staring at my laptop screen at 11 PM, and our “simple” user dashboard is loading slower than a 2005 YouTube video on dial-up.

The query? Just get users with their orders and some basic filtering.

How hard could it be?

by google

Famous last words.

Hibernate was supposed to make our lives easier. Instead, it was generating SQL that looked like it was written by a drunk octopus having an existential crisis.

SELECT * FROM users u 
LEFT JOIN orders o ON u.id = o.user_id
LEFT JOIN order_items oi ON o.id = oi.order_id
LEFT JOIN products p ON oi.product_id = p.id
LEFT JOIN categories c ON p.category_id = c.id
LEFT JOIN subcategories sc ON c.id = sc.category_id
-- ... 47 more joins
WHERE u.active = true

What the actual hell, Hibernate?

The Hibernate Honeymoon (That Didn’t Last)

Let me rewind.

Two years ago, we were young, naive, and believed in magic. Hibernate promised us the world:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Javarevisited

Published in Javarevisited

A humble place to learn Java and Programming better.

Devrim Ozcay
Devrim Ozcay

Written by Devrim Ozcay

Software Engineer & Affiliate Marketer I write about software. https://gumroad.com/discover?a=416513171 My Book In Amazon:https://www.amazon.com/dp/B0FFZL1CZW

Responses (1)

Write a response