Created
December 23, 2016 16:57
-
-
Save begin29/4c8d1672872bf87ad7a6d7840d1b479a to your computer and use it in GitHub Desktop.
indexes, when should add index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment