SQL Server Performance

Is it good to have columns of type bit in composite indexes ?

Discussion in 'Performance Tuning for DBAs' started by Aston, May 1, 2008.

  1. Aston New Member

    Hi,
    Is it good to have columns of type bit in the composite indexes like (col1,col3,bit-cloumn,col5,col7 etc.) ?
    Thanks
  2. MichaelB Member

    It wouldn't hurt, but I wouldnt want the indexes too wide. I think that since a bit takes less space it is not bad, but it isnt very selective which is the purpose for indexes.
  3. jagblue New Member

    It’s Ok
    But don’t put it as your first column try to put Bit column last in composite indexes so you will have batter selectivity
    Thanks
  4. FrankKalis Moderator

    It depends. If you can cover queries by adding that column, it might be worth trying it and watch the effect on the execution plan and the IO. But you only know the "big picture" of your environment so you have to test this yourself. [:)]

Share This Page