.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

Why can a "group by" or "order by" clause be expensive to process?

Posted By :Narayanan     Posted Date :August 31, 2011    Points :40   Category :Sql Server 
requires creation of Temporary tables to process the results of the query

You can also find related Interview Question to Why can a "group by" or "order by" clause be expensive to process?  below: 

difference between having and group by clause ?

Having is basically used for the any condition in Group by Clause

like if you are finding sum,max,min etc of any field you are using group by clause and sum is required with some condition then you use having clause for that condition

like select sum(Amount) as Amount from AD_tblAmount having (Sum(Amount)>0) (More...)

Can we have order by clause in Sql Server View?

Inorder to have ORDER BY Clause in Sql Server

we have to restrict the rows by Using TOP clause

If there is no TOP Clause then you cannot have ORDER BY clause

in a View (More...)

What is Group By Clause

Group By clause is used to group the rows, depending upon one or more values so that the group function can be applied to each group. if the 'Where' clause exists in the select statement, then Group By clause always be followed to the 'Where' clause. If in the select statement, there are non-aggregate columns, then in the Group By clause we need to add all those columns except the aggregate columns.

What is Garbage Collection in .Net? Garbage collection process?

The process of transitively tracing through all pointers to actively used objects in order to locate all objects that can be referenced, and then arranging to reuse any heap memory that was not found during this trace. The common language runtime garbage collector also compacts the memory that is in use to reduce the working space needed for the heap. (More...)

How to get which Process is Blocked in SQL SERVER ?

There are two ways to get this sp_who and sp_who2 . You cannot get any detail about the sp_who2 but its provide more information then the sp_who . And other option from which we can find which process is blocked by other process is by using Enterprise Manager or Management Studio, these two commands work much faster and more efficiently than these GUI-based front-ends. (More...)

What is the difference between thread and process?

Thread - is used to execute more than one program at a time.
process - executes single program.
A thread is a path of execution that run on CPU, a process is a collection of threads that share the same virtual memory. A process has at least one thread of execution, and a thread always run in a process context. (More...)

There is an unnecessary process running on my system Searchprotocolhost.exe, which slow down the speed.
How to stop Searchprotocolhost.exe on WindowsXP?

Searchprotocolhost.exe is one of the reason to make your system slow. Following are the step(s) to stop this and make system fast.

1. Click Start -> Run or Press Windows + R
2. Type services.msc and press 'Ok' or click 'Enter'
3. Scroll down to find 'Windows Search' and double click
4. Stop the process

Another step to disable it from Startup:
5. Reapeat step number 1
6. Type 'msconfig' and press 'Ok' or click 'Enter'
7. Click on 'Startup' tab
8. Uncheck 'Windows Search' checkbox
9. Click Ok.

Restart your system.

To verify :
Open your TaskManager by pressing 'Ctrl+Alt+Del' and locate for Searchprotocolhost.exe in process tab. (More...)

What is ORDER BY Syntax?




What is the name of command in sql server 2005 which is used to kill any process?

The command name is kill.

Syntax is below:

Kill [Process ID] (More...)

Difference between thread and process?

Thread - is used to execute more than one program at a time.
process - executes single program (More...)

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend