从varbinary(MAX)字段检索数据时的性能问题

时间:2019-05-22 06:03:25

标签: sql sql-server-2012

我如何改善包含Varbinary(Max)数据类型的sq语句的性能

表结构

CREATE TABLE [dbo].[Table_1](
    [EmpID] [numeric](18, 0) NOT NULL,
    [SrNo] [numeric](18, 0) NOT NULL,
    [Type] [varchar](10) NULL,
    [FileName] [varchar](100) NULL,
    [D1] [varchar](50) NULL,
    [D2] [varchar](50) NULL,
    [Data] [varbinary](max) NULL,
    [CreatedBy] [varchar](50) NULL,
    [CreatedOn] [datetime] NULL,
 CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED 
(
    [EmpID] ASC,
    [SrNo] 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]

“选择查询”大约需要2到3秒钟才能选择一条记录 数据

检查表的索引编制

0 个答案:

没有答案