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

As an aside, avoid OR as much as possible in your WHERE clauses. Adjust your relations if necessary. ORs can really blow the planner up and slow things down. ANDs are reductive wrt indexes. ORs make multiple passes on the indexes necessary.

It's not always possible to avoid, and it makes perfect sense sometimes, but it'd be better if folks didn't lean into OR so much.



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

Search: