Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005

    Unanswered: Query performance when we use multiple case statements?


    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.


  2. #2
    Join Date
    Jan 2003
    Provided Answers: 1
    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).


  3. #3
    Join Date
    Jan 2007
    Jena, Germany
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts