Select from following answers:- Use EXISTS instead of IN clause since EXISTS is faster than IN Clause
- Use UNION ALL in place of UNION
- Avoid * in SELECT statement
- Try to maintain as small clustered index as much as possible
- All Above
a)EXISTS is faster than IN Clause
b)UNION sort the result set for distinguished values but not UNION ALL hence it is faster
c)Avoid * in SELECT statement since the query engine converts the * to columns name before query execution resulting in slower performance.
d)Try to maintain as small clustered index as much as possible since the fields used in clustered index may also used in nonclustered index.Data in the database is
also stored in the order of clustered index.So, maintaining a huge clustered index on a table with a large number of rows increases the size drastically
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator