Query Tuning | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Query Tuning

Hi all i m rajesh kumar.. I want to tune up my query statements ..like select,update,insert.. i m using distinct for every select statements …how can i use any other technic instead of distinct… can any any one tell me ..thanks in advance Rajesh
Why did you use DISTINCT in all queries?
Can you post some sample data and expected result?
Also post the query you are using Madhivanan Failing to plan is Planning to fail
distinct kills performance (like doing a gorup by on every field in the query).
If you HAVE to use distinct all the time, then your database is poorly designed.
Yes, Please give us some examples. Michael
MCDBA "The statistics on sanity are that one out of every four persons is suffering from some sort of mental illness. Think of your three best friends — if they’re okay, then it’s you!"
Are you coming from the DB2 side of life? In all things related to SQL code it’s essential that we see your code. Otherwise it is almost impossible to suggest anything when we don’t know what your code is doing. —
Frank Kalis
Microsoft SQL Server MVP
Contributing Editor, Writer & Forum Moderatorhttp://www.sql-server-performance.com