We can increase the performance of a web page from the client side as well as from the server side.
Client side Technique
- Give alt and dimension of images without fail for each image in your page.
- Implement the leverage browser caching.
- Use CSS sprite.
- Use only optimized image in web page.
- Use CDN media server for images, CSS, Javascript and media file like .SWF.
Optimization Techniques in SQL
- Avoid heavy bulky SQL queries. Instead of heavy queries use a View and a Stored Procedure.
- Avoid using Triggers whenever possible.
- Temporary table takes more resources than table variable. Hence we should avoid using Temporary table and use table variable.
- Use Union All instead of Union.
- Avoid the DISTINCT keyword.
- Cursors should be replaced with a correlated sub-query if a row-by-row operation is required.
- Avoid a Having clause.
- Avoid using Count(*). Provide the column names in the SELECT statement.
- Restrict your query result with Where Clause.
- Avoid a large number of joins.
- Avoid complicated joins whenever possible.
- Avoid de-normalizations.