Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007

    Unanswered: Index Use for a DPF Table


    I had a query regarding the use of indexes for a DPF table.
    Suppose I have a tableA which is distributed by columnA in a DPF environment. Now If i have a index on Column B and have a query with a filter on Column B. So I see that the db2 optimizer does not use the index on column b.
    So it necessary to have the distribution column in all the indexes for a DPF table ?

    Query: select * from tablea where columnB = <>;



  2. #2
    Join Date
    Jan 2007
    Jena, Germany
    No, it is not necessary.

    The question is if you have statistics collected, how big the table is, etc. Maybe your table just has a few rows (on each partition) and going over an index is just slower than doing a table scan. Or maybe the predicate on column B has a very low selectivity so that the index won't help.
    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