Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2014
    Thanked 0 Times in 0 Posts

    Index A Column with just few distinct values?


    I have a problem index on 4,40,000 records table , it's having only one column using in join condition,

    Column has only 70 distinct values , while measure index selectivity 4,40,000/70=6285 rows reading for single distinct value comparing this full table scan is better than index.

    If any other possibilities to improve performance for this particular column , please suggest to me improve selectivity of data?

  2. #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    Thanked 932 Times in 919 Posts
    Where the number of distinct values in the field is small enough that scanning the entire table is faster than using an index the only way to speed it up is if you can use other fields to reduce the portion of the table that needs to be searched.
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


Posting Permissions

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