SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
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]
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]
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]

Weitere ähnliche Inhalte

Was ist angesagt?

Developing and deploying windows azure applications
Developing and deploying windows azure applicationsDeveloping and deploying windows azure applications
Developing and deploying windows azure applicationsManish Corriea
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)Amazon Web Services Japan
 
Automating Your Azure Environment
Automating Your Azure EnvironmentAutomating Your Azure Environment
Automating Your Azure EnvironmentMichael Collier
 
20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems Manager20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems ManagerAmazon Web Services Japan
 
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트Amazon Web Services Korea
 
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012Amazon Web Services
 
MED203 Scalable Media Processing - AWS re: Invent 2012
MED203 Scalable Media Processing - AWS re: Invent 2012MED203 Scalable Media Processing - AWS re: Invent 2012
MED203 Scalable Media Processing - AWS re: Invent 2012Amazon Web Services
 
Games + Amazon = Love - Presentation quo vadis 2011
Games + Amazon = Love - Presentation quo vadis 2011Games + Amazon = Love - Presentation quo vadis 2011
Games + Amazon = Love - Presentation quo vadis 2011Thomas Lobinger
 
Bringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud servicesBringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud servicesVivek Juneja
 
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...Amazon Web Services Japan
 
Windows Azure for Developers - Building Block Services
Windows Azure for Developers - Building Block ServicesWindows Azure for Developers - Building Block Services
Windows Azure for Developers - Building Block ServicesMichael Collier
 
SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2Chris Richardson
 
Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013
Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013
Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013Amazon Web Services
 
Provisioning in Microsoft Azure
Provisioning in Microsoft AzureProvisioning in Microsoft Azure
Provisioning in Microsoft Azureilagin
 
コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回-
コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回- コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回-
コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回- SORACOM, INC
 
20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step Functions20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step FunctionsAmazon Web Services Japan
 
AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)Amazon Web Services Korea
 

Was ist angesagt? (20)

Developing and deploying windows azure applications
Developing and deploying windows azure applicationsDeveloping and deploying windows azure applications
Developing and deploying windows azure applications
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
 
Automating Your Azure Environment
Automating Your Azure EnvironmentAutomating Your Azure Environment
Automating Your Azure Environment
 
AWS essentials EC2
AWS essentials EC2AWS essentials EC2
AWS essentials EC2
 
AWS essentials S3
AWS essentials S3AWS essentials S3
AWS essentials S3
 
20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems Manager20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems Manager
 
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
 
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
 
MED203 Scalable Media Processing - AWS re: Invent 2012
MED203 Scalable Media Processing - AWS re: Invent 2012MED203 Scalable Media Processing - AWS re: Invent 2012
MED203 Scalable Media Processing - AWS re: Invent 2012
 
Games + Amazon = Love - Presentation quo vadis 2011
Games + Amazon = Love - Presentation quo vadis 2011Games + Amazon = Love - Presentation quo vadis 2011
Games + Amazon = Love - Presentation quo vadis 2011
 
Bringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud servicesBringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud services
 
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
 
Windows Azure for Developers - Building Block Services
Windows Azure for Developers - Building Block ServicesWindows Azure for Developers - Building Block Services
Windows Azure for Developers - Building Block Services
 
SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2
 
IAM Best Practices
IAM Best PracticesIAM Best Practices
IAM Best Practices
 
Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013
Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013
Writing JavaScript Applications with the AWS SDK (TLS303) | AWS re:Invent 2013
 
Provisioning in Microsoft Azure
Provisioning in Microsoft AzureProvisioning in Microsoft Azure
Provisioning in Microsoft Azure
 
コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回-
コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回- コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回-
コンテンツ配信: CloudFront & 名前解決サービス: Route 53 詳細 -ほぼ週刊AWSマイスターシリーズ第3回-
 
20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step Functions20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step Functions
 
AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 6. 긴급 데이터를 Kinesis Streams으로 보내기 (김무현 솔루션즈 아키텍트)
 

Ähnlich wie C net code tips to speed up sql query

ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performancerudib
 
Optimize sql server queries with these advanced tuning techniques tech repu
Optimize sql server queries with these advanced tuning techniques   tech repuOptimize sql server queries with these advanced tuning techniques   tech repu
Optimize sql server queries with these advanced tuning techniques tech repuKaing Menglieng
 
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWSAmazon Web Services Korea
 
Scalable Database Options on AWS
Scalable Database Options on AWSScalable Database Options on AWS
Scalable Database Options on AWSAmazon Web Services
 
AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAmazon Web Services
 
DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012Amazon Web Services
 
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...Amazon Web Services
 
AWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon AuroraAWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon AuroraAmazon Web Services
 
SQL Server 2008 Integration Services
SQL Server 2008 Integration ServicesSQL Server 2008 Integration Services
SQL Server 2008 Integration ServicesEduardo Castro
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaDavid Chandler
 
AWS Cloud Kata 2014 | Jakarta - Startup Best Practices
AWS Cloud Kata 2014 | Jakarta - Startup Best PracticesAWS Cloud Kata 2014 | Jakarta - Startup Best Practices
AWS Cloud Kata 2014 | Jakarta - Startup Best PracticesAmazon Web Services
 
Fundamental Paradigms for Java Developers: NoSQL and OSGI
Fundamental Paradigms for Java Developers: NoSQL and OSGIFundamental Paradigms for Java Developers: NoSQL and OSGI
Fundamental Paradigms for Java Developers: NoSQL and OSGIOtávio Santana
 
Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure OverviewEric Nelson
 
Scaling AWS With Scalr
Scaling AWS With ScalrScaling AWS With Scalr
Scaling AWS With ScalrRam Viswanadha
 
PHP LAMP AWS RightSscale
PHP LAMP AWS RightSscalePHP LAMP AWS RightSscale
PHP LAMP AWS RightSscalemaxgribov
 

Ähnlich wie C net code tips to speed up sql query (20)

ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Optimize sql server queries with these advanced tuning techniques tech repu
Optimize sql server queries with these advanced tuning techniques   tech repuOptimize sql server queries with these advanced tuning techniques   tech repu
Optimize sql server queries with these advanced tuning techniques tech repu
 
Speed up sql
Speed up sqlSpeed up sql
Speed up sql
 
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
 
Scalable Database Options on AWS
Scalable Database Options on AWSScalable Database Options on AWS
Scalable Database Options on AWS
 
AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWS
 
DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012
 
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
 
AWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon AuroraAWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon Aurora
 
SQL Server 2008 Integration Services
SQL Server 2008 Integration ServicesSQL Server 2008 Integration Services
SQL Server 2008 Integration Services
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
 
NodeJS @ ACS
NodeJS @ ACSNodeJS @ ACS
NodeJS @ ACS
 
Ebook11
Ebook11Ebook11
Ebook11
 
AWS glue technical enablement training
AWS glue technical enablement trainingAWS glue technical enablement training
AWS glue technical enablement training
 
AWS Cloud Kata 2014 | Jakarta - Startup Best Practices
AWS Cloud Kata 2014 | Jakarta - Startup Best PracticesAWS Cloud Kata 2014 | Jakarta - Startup Best Practices
AWS Cloud Kata 2014 | Jakarta - Startup Best Practices
 
Fundamental Paradigms for Java Developers: NoSQL and OSGI
Fundamental Paradigms for Java Developers: NoSQL and OSGIFundamental Paradigms for Java Developers: NoSQL and OSGI
Fundamental Paradigms for Java Developers: NoSQL and OSGI
 
Intro to Sails.js
Intro to Sails.jsIntro to Sails.js
Intro to Sails.js
 
Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure Overview
 
Scaling AWS With Scalr
Scaling AWS With ScalrScaling AWS With Scalr
Scaling AWS With Scalr
 
PHP LAMP AWS RightSscale
PHP LAMP AWS RightSscalePHP LAMP AWS RightSscale
PHP LAMP AWS RightSscale
 

Mehr von Kaing Menglieng

What is your sql server backup strategy tech_republic
What is your sql server backup strategy    tech_republicWhat is your sql server backup strategy    tech_republic
What is your sql server backup strategy tech_republicKaing Menglieng
 
Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republicKaing Menglieng
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republicKaing Menglieng
 
Using hash fields in sql server tech republic
Using hash fields in sql server   tech republicUsing hash fields in sql server   tech republic
Using hash fields in sql server tech republicKaing Menglieng
 
Using grouping sets in sql server 2008 tech republic
Using grouping sets in sql server 2008   tech republicUsing grouping sets in sql server 2008   tech republic
Using grouping sets in sql server 2008 tech republicKaing Menglieng
 
Understand when to use user defined functions in sql server tech-republic
Understand when to use user defined functions in sql server   tech-republicUnderstand when to use user defined functions in sql server   tech-republic
Understand when to use user defined functions in sql server tech-republicKaing Menglieng
 
Sql server indexed views speed up your select queries part 1 - code-projec
Sql server indexed views   speed up your select queries  part 1 - code-projecSql server indexed views   speed up your select queries  part 1 - code-projec
Sql server indexed views speed up your select queries part 1 - code-projecKaing Menglieng
 
Sql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupSql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupKaing Menglieng
 
Sql server common interview questions and answers
Sql server   common interview questions and answersSql server   common interview questions and answers
Sql server common interview questions and answersKaing Menglieng
 
Sql server common interview questions and answers page 6
Sql server   common interview questions and answers page 6Sql server   common interview questions and answers page 6
Sql server common interview questions and answers page 6Kaing Menglieng
 
Sql server common interview questions and answers page 5
Sql server   common interview questions and answers page 5Sql server   common interview questions and answers page 5
Sql server common interview questions and answers page 5Kaing Menglieng
 
Sql server common interview questions and answers page 4
Sql server   common interview questions and answers page 4Sql server   common interview questions and answers page 4
Sql server common interview questions and answers page 4Kaing Menglieng
 
Sql server common interview questions and answers page 2
Sql server   common interview questions and answers page 2Sql server   common interview questions and answers page 2
Sql server common interview questions and answers page 2Kaing Menglieng
 
Sql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seSql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seKaing Menglieng
 
Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsKaing Menglieng
 
Speed up sql server apps - visual studio magazine
Speed up sql server apps  - visual studio magazineSpeed up sql server apps  - visual studio magazine
Speed up sql server apps - visual studio magazineKaing Menglieng
 
See sql server graphical execution plans in action tech republic
See sql server graphical execution plans in action   tech republicSee sql server graphical execution plans in action   tech republic
See sql server graphical execution plans in action tech republicKaing Menglieng
 
Reviewing sql server permissions tech republic
Reviewing sql server permissions   tech republicReviewing sql server permissions   tech republic
Reviewing sql server permissions tech republicKaing Menglieng
 
Query optimization how to search millions of record in sql table faster -
Query optimization   how to search millions of record in sql table faster  -Query optimization   how to search millions of record in sql table faster  -
Query optimization how to search millions of record in sql table faster -Kaing Menglieng
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
New date datatypes in sql server 2008 tech republicKaing Menglieng
 

Mehr von Kaing Menglieng (20)

What is your sql server backup strategy tech_republic
What is your sql server backup strategy    tech_republicWhat is your sql server backup strategy    tech_republic
What is your sql server backup strategy tech_republic
 
Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republic
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republic
 
Using hash fields in sql server tech republic
Using hash fields in sql server   tech republicUsing hash fields in sql server   tech republic
Using hash fields in sql server tech republic
 
Using grouping sets in sql server 2008 tech republic
Using grouping sets in sql server 2008   tech republicUsing grouping sets in sql server 2008   tech republic
Using grouping sets in sql server 2008 tech republic
 
Understand when to use user defined functions in sql server tech-republic
Understand when to use user defined functions in sql server   tech-republicUnderstand when to use user defined functions in sql server   tech-republic
Understand when to use user defined functions in sql server tech-republic
 
Sql server indexed views speed up your select queries part 1 - code-projec
Sql server indexed views   speed up your select queries  part 1 - code-projecSql server indexed views   speed up your select queries  part 1 - code-projec
Sql server indexed views speed up your select queries part 1 - code-projec
 
Sql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupSql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookup
 
Sql server common interview questions and answers
Sql server   common interview questions and answersSql server   common interview questions and answers
Sql server common interview questions and answers
 
Sql server common interview questions and answers page 6
Sql server   common interview questions and answers page 6Sql server   common interview questions and answers page 6
Sql server common interview questions and answers page 6
 
Sql server common interview questions and answers page 5
Sql server   common interview questions and answers page 5Sql server   common interview questions and answers page 5
Sql server common interview questions and answers page 5
 
Sql server common interview questions and answers page 4
Sql server   common interview questions and answers page 4Sql server   common interview questions and answers page 4
Sql server common interview questions and answers page 4
 
Sql server common interview questions and answers page 2
Sql server   common interview questions and answers page 2Sql server   common interview questions and answers page 2
Sql server common interview questions and answers page 2
 
Sql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seSql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql se
 
Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joins
 
Speed up sql server apps - visual studio magazine
Speed up sql server apps  - visual studio magazineSpeed up sql server apps  - visual studio magazine
Speed up sql server apps - visual studio magazine
 
See sql server graphical execution plans in action tech republic
See sql server graphical execution plans in action   tech republicSee sql server graphical execution plans in action   tech republic
See sql server graphical execution plans in action tech republic
 
Reviewing sql server permissions tech republic
Reviewing sql server permissions   tech republicReviewing sql server permissions   tech republic
Reviewing sql server permissions tech republic
 
Query optimization how to search millions of record in sql table faster -
Query optimization   how to search millions of record in sql table faster  -Query optimization   how to search millions of record in sql table faster  -
Query optimization how to search millions of record in sql table faster -
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
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]