dbTalk Databases Forums  

Optimalization - SELECT tatement

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Optimalization - SELECT tatement in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
marianowic
 
Posts: n/a

Default Optimalization - SELECT tatement - 05-17-2007 , 05:50 AM






Hello everyone.
I have got a simple question, but very important for me.
I making a quite big report and I have a lot of conditions to compare.
And I wonder, what is faster:
One SELECT statement with three comparing conditions
OR
Three SELECTS, each with one comparing condition
All the conditions are separated by AND condition.

The Store Procedure is being made on MS SQL SERVER 2000, the size of
table is around 22098165 records.

Thanks a lot for help... marianowic


Reply With Quote
  #2  
Old   
Dan Guzman
 
Posts: n/a

Default Re: Optimalization - SELECT tatement - 05-17-2007 , 07:50 AM






Please don't post the same question independently to different groups. This
has been answered in microsoft,public.sqlserver.programming and
microsoft,public.sqlserver.server.

If you have a question appropriate for multiple groups, post the question
once and specify all relevant groups (crosspost). This will allow all
parties to follow the complete thread and avoid duplication of effort.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"marianowic" <marianowic (AT) gmail (DOT) com> wrote

Quote:
Hello everyone.
I have got a simple question, but very important for me.
I making a quite big report and I have a lot of conditions to compare.
And I wonder, what is faster:
One SELECT statement with three comparing conditions
OR
Three SELECTS, each with one comparing condition
All the conditions are separated by AND condition.

The Store Procedure is being made on MS SQL SERVER 2000, the size of
table is around 22098165 records.

Thanks a lot for help... marianowic



Reply With Quote
  #3  
Old   
marianowic
 
Posts: n/a

Default Re: Optimalization - SELECT tatement - 05-18-2007 , 05:47 AM



Sorry!
I didnt think it will make so big problem.
I will not do it again




Reply With Quote
  #4  
Old   
Dan Guzman
 
Posts: n/a

Default Re: Optimalization - SELECT tatement - 05-18-2007 , 06:49 AM



Thanks for your consideration.

--
Dan Guzman
SQL Server MVP

"marianowic" <marianowic (AT) gmail (DOT) com> wrote

Quote:
Sorry!
I didnt think it will make so big problem.
I will not do it again





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.