Hacker News new | ask | show | jobs
by jebblue 5156 days ago
There must be a better answer than denormalizing. I'd try to get a DBA or DBE involved to look at the situation if possible. Re-structuring the query might be all that's needed.
1 comments

Of couse that's an over-simplification, de-normalisation certainly fits in after many other forms of optimisation.
I agree, I think denormalizatuon is one of those things you do after trying to rewrite the query. After all, if you can get the optimiser to choose a different access plan that's quicker by rewriting the query to be more efficient, then you're better off overall. There's costs to denormalization too... Not to mention you need to ensure that your application code writes correctly.