我有下表:
create table Order_Details
(
ID int not null primary key
,Order_ID int
,Order_Description nvarchar(40)
)
Run Code Online (Sandbox Code Playgroud)
我们在上表中插入了 27,500,000 行,当我在查询下面运行时,它需要 6-7 秒。
select ID,Order_ID, Order_Description
from Order_Details
where Order_Description like '%Football Size%'
Run Code Online (Sandbox Code Playgroud)
我在Order_Description包含ID和应用了非聚集索引Order_ID。
还有其他方法可以优化查询并以更快的方式获得结果吗?