To achieve performance and scalability of your database you need to create optimized SQL queries. Here is a checklist
Don’t use heavy calculation in SQL Query.
Write correctly formed queries.
Return only the rows and columns needed.
Avoid expensive operators such as NOT LIKE.
Know the performance and scalability characteristics of queries.
Avoid explicit or implicit functions in WHERE clauses.
Use locking and isolation level hints to minimize locking.
Use stored procedures or parameterized queries.
Minimize cursor use.
Avoid long actions in triggers.
Use temporary tables and table variables appropriately.
Limit query and index hints use.
Fully qualify database objects.