Which is best Subquery (or) joins in sql server? explain why
Answers were Sorted based on User's Feedback
Answer / rajeevrohilla
In normal situation join are best since there is no
subquery for each record for the other table. but in some
situations Subquery are best. for example- when the
subquery results one or fewer (3 or 4 records) that it will
work faster since it also saves the joining time(if there
are more than 1 joining fields then joining takes lots of
time). Subquries also perform better when tables have less
amount of data.
Is This Answer Correct ? | 17 Yes | 4 No |
Answer / parmanand
Joins are good, Sub queries are substantially faster than
cursor in most cases, however shower than other options that
might be available in SQL Server.
Is This Answer Correct ? | 5 Yes | 5 No |
How to call stored procedure using http soap?
What are cursors in ms sql server?
How to define output parameters in stored procedures?
How to check if a table is being used in sql server?
What are wait types?
What are the steps to insert a table?
How we can compare two database data?
Explain sub-query?
What are the built in functions in sql server?
1. What is CUBE Operator? 2. what are the new data types are available in sql server 2008? 3. Inisde a nested queries, how many subqueries u can have?
What is difference between clustered and non clustered index?
what is hash nonclustered index