Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a general recommendation maybe this is ok. But, unrealistic relative to the world we live in. Sometimes you need to use hints. Oracle / PostgreSQL / what have you, are not perfect nor are developers writing the SQL.

Is your customer going to wait for the next version of Oracle? Is your dev team going to fix some sev 3 performance bug?

Hints allow you to use your brain to help the optimizer. Why would you make a hard rule not to use them? Why else are they there?



I won't speak for Oracle because it's always been a "if you have the money you can get a custom patch for the behavior you want" game.

But for Postgres, you contact the developers. If your problems are costing you so much money why wouldn't you just hire a core developer on the Postgres team or hire EnterpriseDB on contract to work on your issues? They'll fix the bug, upstream the fix, and roll you updated packages you can push out to your servers. Not entirely different than working with Oracle, except you are working in the open source world.

Hints are bad. Next time you upgrade your database you may end up with worse performance due to other changes in the query planner. Once your data crosses a certain size threshold it may also start performing worse. They are unpredictable. You will never know when they could break. Using them is the wrong solution.


I agree with paragraph three. A hint is a directive. Now we are stuck with it. Bad stuff can ensue...maybe. But, maybe my customer is pissed now. Total cost to fix: a couple hours.

If I had the budget and developers to make PostgreSQL as performant as Oracle, I would be living on an island next to Larry.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: