简体   繁体   English

良好的SQL引擎,可用于单列表中的巨大行

[英]Good SQL engine for huge rows in a single column table

I have a table where I store almost any English word . 我有一张桌子,可以存放几乎所有的英语单词 This table is for a Scrabble type word game currently I am working on. 这张桌子是我目前正在研究的拼字游戏。 Here is the syntax, 这是语法,

create table words(
    `word` varchar(50),
    primary key `word`
)

This table will be very big. 这个桌子会很大。 And I have to check every time if the given word exists when gamer makes a move. 而且我必须每次检查玩家移动时给定单词是否存在。

I am using mysql. 我正在使用mysql。 Currently I have stored ENABLE words there. 目前,我已在其中存储ENABLE单词。 My question is when I start adding more words and gamers start to play wont it be performing low? 我的问题是,当我开始添加更多单词并且玩家开始玩时,它的表现会不会很差? If so, is there any way I can optimize it? 如果是这样,我有什么方法可以对其进行优化? Does NO-SQL has anything to do with this scenario? NO-SQL与这种情况有关系吗?

You should have no performance problems but if you are worried about performance you can keep this in mind: 您应该没有性能问题,但是如果您担心性能,可以记住以下几点:

Using LIKE instead of = will cause slower queries if you have a lot of rows. 如果您有很多行,则使用LIKE代替=将导致查询变慢。 (but you must have an extremely large amount of rows for a noticeable difference) (但您必须有大量的行才能明显区别)

Also, you might do some testing to see which performs better on large tables, select count or select * or select word. 此外,您可能需要进行一些测试,以查看哪种方法在大型表上效果更好,请选择计数或选择*或选择单词。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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