New date datatypes in sql server 2008 tech republic
C net code tips to speed up sql query
1. C Net Code: Tips to Speed up SQL Query
C Net Code
A blog about Microsoft Technology like ASP.NET,C#.NET,SQL Server, Ajax that majorly focus on code, tips ,tweaks and tricks.
Home Contact Me
Thursday, July 19, 2012 Search This Blog
Go !!!
Tips to Speed up SQL Query
Translate
Almost Every website data is stored in a database and served to visitors upon request. Databases are very fast, but
there is lots of things that we need to enhance speed and make sure not to waste any server resources. In this
article, I am suggesting you 10 tips to optimize and speed up your Sql query. Click to Feed hungry
Fishes
1. Do not Select column that we do not need.
A very common practice is to use Select * from tablename.
It's better to select column which you need in output.
2. Avoid using Cursor , use while loop instead of Cursor.
3. Avoid using Sql statement in a loop.It's takes a lot of resource.
4.Use Join instead of Subqueries.
Blog Archive
SELECT a.id,
(SELECT MAX(created) ▼ 2012 (15)
FROM posts ▼ July (15)
WHERE book_id = a.id) Send multiple parameters in
jquery ajax in asp.net...
AS latest_post FROM books a
Alter Encrypted Stored
Procedure
Encrypted Stored Procedure
However subqueries are useful, they often can be replaced by a join, which is definitely faster to execute.
What's New in ASP.NET 4.5
SELECT a.id, MAX(p.created) AS latest_post and Visual Web
Developer...
FROM books
a UNION VS UNION ALL
INNER JOIN posts p Stored Procedure and
ON (a.id = p.book_id) Transactions
GROUP BY a.id Send Asynchronous Email in
Asp.net
Unable to connect to Sql
Server
Tips to Speed up SQL Query
5. Use Union instead of OR
Enable IIS 7.0 Compression
Speeding Up Your Web Site
6. Use Set No Count On at the beginning of Stored procedure and Set No Count Off before ending of Stored
procedure. Favicon
Visual Studio Build error
7. Use indexing on Table. Create clustered or non-clustered index on those column which you require frequently in sql
Unlimited Connection TimeOut
query. in Asp.net and SQL
How to set gzip/deflate
8.Do not Name Your Stored Procedures with ‘sp_’ at the start. compression in .net.
9. Normalize your tables.
Follow by Email
10. Use schema name before your table name. like Select id from dbo.books.
http://cnetcode.blogspot.com/2012/07/tips-to-speed-up-sql-query.html[08/29/2012 4:24:44 PM]
2. C Net Code: Tips to Speed up SQL Query
Submit
:)) About Me
View my complete profile
+1 Recommend this on Google
Labels: optimization, Sql Server, Static Compression, tips
No comments:
Post a Comment
Comment as: Select profile...
Select profile...
Publish Preview
Links to this post
Create a Link
Newer Post Home Older Post
Subscribe to: Post Comments (Atom)
1 user
Hit Counter
(RD). Powered by Blogger.
http://cnetcode.blogspot.com/2012/07/tips-to-speed-up-sql-query.html[08/29/2012 4:24:44 PM]
3. C Net Code: Tips to Speed up SQL Query
http://cnetcode.blogspot.com/2012/07/tips-to-speed-up-sql-query.html[08/29/2012 4:24:44 PM]