Hacker News new | past | comments | ask | show | jobs | submit login

No one is saying that. Your original comment can be read like you're saying using hints is a sign of failure of the person writing the query which is probably why the downvotes. Maybe you meant a sign of failure for the optimizer, which is also debatable given they really cannot be perfect. An optimizer will quickly run into NP-hard problems like join ordering - which is just one small reason among many that they won't always find the fastest query plan.



You're right, I meant a failure of the DB/optimiser not the person. Thanks.

No they're not perfect but I need them rarely with MSSQL

> An optimizer will quickly run into NP-hard problems like join ordering

As a start, dynamic planning based on cardinality estimation based on stats. And then some. It explodes horribly, yes.




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

Search: