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.
我想在查询中使用指定的索引。就像 SQLite 中的 INDEXED BY 一样。
我在 MS Access 中找不到它。
有人知道吗?
Access 将尝试通过分析可用索引来优化查询本身,并做出它认为最好的选择。与 SQL Server 不同,没有 HINT 运算符。您可以做的最好的事情是设置 WHERE 子句的序数位置,将覆盖最多的索引放在首位,这应该有助于 Access 优化。
SELECT * FROM tblCustomers WHERE City= 'Denver' AND CustomerName Like 'A*'
城市首先减少集合,然后CustomerName过滤器会更容易。
希望这可以帮助...