-
Notifications
You must be signed in to change notification settings - Fork 6
Description
https://github.com/jarulraj/sqlcheck
New linters
generic_primary_key
- #94
Skip using a generic primary key (id) - Adding an id column to every table causes several effects that make its use seem arbitrary. You might end up creating a redundant key or allow duplicate rows if you add this column in a compound key. The name id is so generic that it holds no meaning. This is especially important when you join two tables and they have the same primary key column name.
https://github.com/jarulraj/sqlcheck/blob/master/docs/logical/1004.md
select_star
- #92
When you
SELECT *
, you're often retrieving more columns from the database than your application really needs to function. This causes more data to move from the database server to the client, slowing access and increasing load on your machines, as well as taking more time to travel across the network. This is especially true when someone adds new columns to underlying tables that didn't exist and weren't needed when the original consumers coded their data access.https://github.com/jarulraj/sqlcheck/blob/master/docs/query/3001.md
having_clause
- #93
Rewriting the query's HAVING clause into a predicate will enable the use of indexes during query processing.
https://github.com/jarulraj/sqlcheck/blob/master/docs/query/3012.md