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

Not all of these are "anti-patterns", your query clause not matching your index is a problem of not understanding how indexes work.

Some of these have nothing to do with SQL the language itself, and more to do with database schema design. If you have to do a DISTINCT, it means your primary key design is likely not right. If you are layering too many views, something is broken in the base table design, requiring the creation of all these views.

A good database model goes a long way to avoiding all this.



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

Search: