If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Query performance when we use multiple case statements?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-10-07, 02:11
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
Query performance when we use multiple case statements?

Hi,

Could any one of you let me know will the usage of many case statements brings the performance of the query down? like, for the huge chunk of data might be around 10 million records and 7-8 tables being joined? would it be more appropriate to do it with the case statements or using some ETL tools?
and how much impact does DB2 functions has on the query? would it be suggested to use them or to avoid them?

Please support your answers with factual information.

Regards,
Waseem
Reply With Quote
  #2 (permalink)  
Old 05-10-07, 03:13
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
too general question. I have used CASE without performance problems and I have used CASE with performance problems. So I don't think there is any general rule.

It also depends on what ETL tool do you use and what the tool is working with program code or SQL.

It also depends on what kind of hardware you are working on.

It depends on what kind of join are you using - what kind of tables are they are they big one or just 10 rows tables (one 10 milion and 7 with 10 rows).

Regards,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 05-10-07, 04:39
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I agree with Grofaty. The best way would be to set up a test system and simply measure execution time.

Beyond that, we could only give some advise if we get more details.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On