Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Instead of LIKE if a use IN, will it effect performance

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Wed Feb 07, 2007 12:05 pm    Post subject: Instead of LIKE if a use IN, will it effect performance
Reply with quote

Hi Guys,

with your experience can you please let me the answers for the below queries

1. If i reduce the lists of columns in the select clause in a query does it alter the performance (incerease/decrease)
2. Instead of LIKE if a use IN for a where clause will effect performance
(incerease/decrease)

Regards,
Jayaram
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Feb 07, 2007 2:13 pm    Post subject: Re: Instead of LIKE if a use IN, will it effect performance
Reply with quote

rajandhla wrote:
1. If i reduce the lists of columns in the select clause in a query does it alter the performance (incerease/decrease)
No, it should not.
Quote:
2. Instead of LIKE if a use IN for a where clause will effect performance (incerease/decrease)
It depends upon the indexes.
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Wed Feb 07, 2007 3:19 pm    Post subject:
Reply with quote

Thanks For the prompt reply.........

One more query...

If i use relational operator instead of NOT NULL in where clause will it effect performance.....

ex : Instead of A is not NULL if i use A>0 will it effect performance
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Fri Feb 09, 2007 3:53 pm    Post subject:
Reply with quote

Quote:
1. If i reduce the lists of columns in the select clause in a query does it alter the performance (incerease/decrease)


I would say it will increase the performance(depends on how much data you are dealing with and the logic involved in the query). No need to fetch additional columns.

2. LIKE is used when you know the solution partially. Probably this will scan and read more values. IN is used when you know the full value. If that is a indexed column IN should increase the peroformance.

3. Once again performance does not depends on what values does A contain. It doesn't matter. It depends whether you query is going for Index scan or tablespace scan or something like that.
Back to top
View user's profile Send private message
Suryanarayana.tadala

New User


Joined: 03 Nov 2005
Posts: 43
Location: St.Louis

PostPosted: Fri Feb 09, 2007 10:08 pm    Post subject:
Reply with quote

I would say performance increases on the volume of data you are dealing with and the business that the query has ...but to be straight enough it woud be Yes Performance increases

2.Yes Performace is increased...

3. It depends whether you query is going for Index scan or tablespace scan or something like that.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CONTIG for performance? JPVRoff JCL & VSAM 7 Fri Jun 09, 2017 8:39 am
No new posts BC, BCR, BRC, BRCL performance steve-myers PL/I & Assembler 0 Fri Dec 23, 2016 7:44 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What are the way we can improve CPU p... Gunapala CN DB2 10 Mon Oct 24, 2016 2:16 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us