我有一张名为“索引”的表格。我意识到这是MySQL中的一个关键字,我想知道如何在查询中引用这个表?我的错误:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL serverversion for the right syntax to use near ''Index' (ID) )' at line 9
所以我有一个包含100000行的表现在,我刚刚添加了一个新列field3,而且field3上还有一个索引因此,我添加了大约50, val6, val7, val8, val9, val10);
这最终导致不使用索引,并最终对整个100000+行执行完整的表扫描。mysql为什么要这样做?我知道来自的mysql "If you need to access most of the rows, it is faster to