begin29
12/23/2016 - 4:57 PM

indexes, when should add index

indexes, when should add index

# show indexes
show INDEXES from table_name

when I should add index?
#when selectivity is big
selectivity = count of variations/all rows * 100%
#selectivity for sex column is low: sel_of_sex = 2(male, female)/10000 *100 = 0.02%
#http://www.programmerinterview.com/index.php/database-sql/selectivity-in-sql-databases/