SQL Serverデータベースがあり、テーブルに1500000行があります...次の手順のデータ実行時間が非常に長いためです
テーブル - - -
CREATE TABLE [dbo].[MyTable](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[Link] [text] NULL,
[Title] [text] NULL,
[Duration] [text] NULL,
[Image] [text] NULL,
[Embbed] [text] NULL,
[Keywords] [text] NULL,
[Category] [text] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
手順 - - -
ALTER PROCEDURE [dbo].[Search]
@SearchQuery varchar(1000),
@Id bigint
As
BEGIN
Select top 100 * from MyTable
where Id > @Id and Title like '%'+@SearchQuery+'%'
1500000行のテーブルでSQLクエリの実行時間を最小限に抑える方法を教えてください。