简体   繁体   中英

Is there a way to index only specific column values in MySQL?

I have a table of ~13 million rows, and the data in the column I am interested in is distributed like this ( http://pastebin.com/raw.php?i=aHXjB5FA ).

I would like to be able to efficiently find notable values (say, 45 pts and above). Is it possible to create an index only for the rows that have pts >= 45?

If not, will a normal index help? It seems like it would be a waste of disk space, since in this case I am only interested in ~2500 of the 13 million rows. Also, each row has 12 more columns I would like to index similarly (it's a basketball statistics database).

MySQL不支持所谓的部分索引 ,该部分索引仅将表行的子集添加到索引中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM