Using WHERE Clause in SELECT Query



IBM's flagship relational database management system

Using WHERE Clause in SELECT Query

Postby saurabhgupta86 » Sun Jul 14, 2013 7:38 pm

Hi,

Is it advisable to use WHERE Clause in a SELECT Query when we already know that the records which will be filtered out are negligible as compared to the number of records which will qualify.

In my case i am using primary key field in WHERE Clause.

Please suggest.

Regards,
Saurabh
saurabhgupta86
 
Posts: 13
Joined: Tue Aug 14, 2012 6:35 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Using WHERE Clause in SELECT Query

Postby dick scherrer » Mon Jul 15, 2013 1:12 am

Hello,

What will be done with the info that is selected? If the process is basically sequential it is often better to unload the table and work with the unloaded data. Depends on if there are other db tables referenced.

Personally, I believe it is better to code the WHERE.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post