3. Find the indexes which need to be reorganized or rebuild.
4. Use “set not count on/off” as it will increases the performance of the queries.
5. Try to avoid the cursor and replaces it with while loop or using switch statements or Sub Queries.
since until the cursor is not deallocated, memory is occupied by the cursor data and in case of large amount of data, it can decreased the performance of the sql queries.
6. Proper use of temporary tables and table variable.
7. Use Joins instead of Subqueries.
8. Intelligent use of Distinct command. Distinct command add additional cost to the query. So we should use Distinct commands only when we needs the unique results.
9. Proper error handling using Try….catch.
10. Do not use “Select * from tablename” command when you only needs to select few columns from the table.
11. Keep the Transactions as short as possible
12. Never use “sp_” prefix in your store procedure name.
13. Use SQL Profiler to monitor the SQL performance.
14. Use stored procedure instead of inline Queries in the code.
15. If we do not need the unique results, use Union all instead of Union.
Nr. 5 (Try to avoid the cursor and replaces it with while loop…) is like recommending fighting fire with flooding… A WHILE loop still process one row et a time. Avoid the cursor is correct. But avoid a WHILE loop, too! Use a set based solution whenever possible and avoid any form of row-based data handling.
Regarding Number 2 (Indexes should be created on the tables as it increases the performance of the SQL Queries.)
This is true. However, they also slow down inserts, updates, and deletes, and increase storage requirements. On active tables, with many concurrent writes and reads, do not add indexes without considering the impact on table updates.Instead, add indexes ONLY where they are needed, else, it could make your system slower overall.
Pingback: cpasbien
Pingback: https://internetnews.net.pl/forum/biznes-f4/biuro-rachunkowe-ksiegowa-halinow-t131.html
Pingback: bong88
Pingback: fun551.com
Pingback: paper crafting dies
Pingback: https://www.olx.pl/
Pingback: New African Generation
Pingback: w88ok
Pingback: xembongtructuyen
Pingback: cbd oil tastes like
Pingback: Dream Market Deutsch
Pingback: Nachfolger
Pingback: Drogen
Pingback: m88vina
Pingback: website
Pingback: Manual Resuscitator Market: How Top Leading Companies Can Make This Smart Strategy Work 2016 – 2026
Pingback: Digital Income System
Pingback: m.w88
Pingback: web design dallas tx
Pingback: ratucapsa
Pingback: senangpoker
Pingback: bitcoin qr code generator
Pingback: daftar qiuqiu99
Pingback: poker99
Pingback: trang m88
Pingback: brokerbin
Pingback: Skrota bil
Pingback: pasar poker
Pingback: duratrans printing nyc