Can I optimize a SELECT DISTINCT x FROM hugeTable query by creating an index on column x?

后端 未结 8 817
闹比i
闹比i 2021-01-01 11:51

I have a huge table, having a much smaller number (by orders of magnitude) of distinct values on some column x.

I need to do a query like SELECT D

8条回答
  •  独厮守ぢ
    2021-01-01 12:09

    If your column x has low cardinality, creating local bitmap index would increase the performance many fold.

提交回复
热议问题