MySQL and NoSQL: Help me to choose the right one

前端 未结 5 908
予麋鹿
予麋鹿 2020-11-22 03:54

There is a big database, 1,000,000,000 rows, called threads (these threads actually exist, I\'m not making things harder just because of I enjoy it). Threads has only a few

5条回答
  •  孤独总比滥情好
    2020-11-22 04:31

    Indices are a must - but remember to choose the right type of index: BTREE is more suitable when using queries with "<" or ">" in your WHERE clauses, while HASH is more suitable when you have many distinct values in one column and you are using "=" or "<=>" in your WHERE clause.

    Further reading http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html

提交回复
热议问题