Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テーブル(「食品」としましょう)の場合、そのエントリのタイプ(果物など)を指定する潜在的な値[1,2,3,4]を持つ列「タイプ」があります。私が期待するように
SELECT name FROM food WHERE type = 3 ;
この場合、インデックスが推奨されるのでしょうか。そのフィールドに可能な値はほんのわずかしかないので、インデックスが役立つかどうか疑問に思います.(同様にMongoDB?)