如何避免在以下键中加入一个外键时全表扫描是我的sql查询,当我使用explain select它时,显示查询正在扫描整个表,即使使用where子句COALESCE(guardians.firstname, students.firstname) LEFT JOINstudents ON message_recipient
我有一个包含大量信息的表,现在我希望用户可以搜索该表。string word in words) sqlSearch += " and Searchstring LIKE "+ "'%" + word + "%'";tableSearch = db.Query我在这里发现是解决这个问题的一个很好的方案。我的问题是,目前我找到的唯一解决方案是:
if (words.Length < 2)