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 |
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
Why is normalisation important?
How to assign new column names in a view?
How to delete an existing database user?
Can a unique index be created on a column, which contains null?
Can you please explain the difference between primary keys and foreign keys?
plz tell me the new features of sqlserver2000,sqlserver2002,sqlserver2005
How to get the query of a table in sql server?
How to name query output columns in ms sql server?
How to connect a database with sql express.?
Define indexes?
Is the primary key column of a table an index in ms sql server?