-3

データベースに と の 2 つのテーブルがありtb_CampaignLeadますtb_Feed。両方のテーブルには数千の行があり、主キーにそれぞれ 1 つのインデックスがあります。tb_CampaignLeadは よりも 20% 多いデータを持っていますtb_Feed。それでもa のtb_Feed場合よりも 6 倍遅いです。なぜそんなに遅いのか誰か教えてください。テーブルの構造は次のとおりです。tb_CampaignLeadSELECT *tb_Feed

CREATE TABLE [dbo].[tb_Feed](
    [FeedID] [uniqueidentifier] NOT NULL,
    [DateCreated] [smalldatetime] NULL,
    [LeadSourceID] [int] NULL,
    [RawLeadURL] [nvarchar](max) NULL,
    [CostPerEnquiry] [money] NULL,
    [ResultText] [nvarchar](max) NULL,
    [SrcResultText] [nvarchar](max) NULL,
    [SrcResult] [bit] NULL,
    [Encrypted] [bit] NULL,
    [ProductID] [int] NULL,
 CONSTRAINT [PK_tb_Feed] PRIMARY KEY CLUSTERED 


CREATE TABLE [dbo].[tb_CampaignLead](
    [LeadID] [uniqueidentifier] NOT NULL,
    [FeedID] [uniqueidentifier] NOT NULL,
    [CampaignID] [int] NOT NULL,
    [ProductID] [int] NOT NULL,
    [CompanyID] [int] NOT NULL,
    [LeadSourceID] [int] NOT NULL,
    [DateCreated] [smalldatetime] NULL,
    [LeadTextEmail] [nvarchar](max) NULL,
    [LeadTextOther] [nvarchar](max) NULL,
    [DateSent] [smalldatetime] NULL,
    [EmailResponse] [nvarchar](max) NULL,
    [OtherResponse] [nvarchar](max) NULL,
    [EmailOK] [bit] NULL,
    [OtherOK] [bit] NULL,
    [ResultPass] [bit] NULL,
    [L_Title] [nvarchar](50) NULL,
    [L_Email] [nvarchar](100) NULL,
    [L_Firstname] [nvarchar](max) NULL,
    [L_Surname] [nvarchar](max) NULL,
    [L_Address1] [nvarchar](max) NULL,
    [L_Address2] [nvarchar](max) NULL,
    [L_Address3] [nvarchar](max) NULL,
    [L_TownCity] [nvarchar](max) NULL,
    [L_AreaRegion] [nvarchar](max) NULL,
    [L_Country] [nvarchar](max) NULL,
    [L_PostCode] [nvarchar](50) NULL,
    [L_Telephone1] [nvarchar](50) NULL,
    [L_Telephone2] [nvarchar](50) NULL,
    [L_DOB] [smalldatetime] NULL,
    [L_Extra1] [nvarchar](max) NULL,
    [L_Extra2] [nvarchar](max) NULL,
    [L_Extra3] [nvarchar](max) NULL,
    [L_Extra4] [nvarchar](max) NULL,
    [L_Extra5] [nvarchar](max) NULL,
    [L_Extra6] [nvarchar](max) NULL,
    [L_Extra7] [nvarchar](max) NULL,
    [L_Extra8] [nvarchar](max) NULL,
    [L_Extra9] [nvarchar](max) NULL,
    [L_Extra10] [nvarchar](max) NULL,
    [L_Extra11] [nvarchar](max) NULL,
    [L_Extra12] [nvarchar](max) NULL,
    [L_Extra13] [nvarchar](max) NULL,
    [L_Extra14] [nvarchar](max) NULL,
    [L_Extra15] [nvarchar](max) NULL,
    [L_Extra16] [nvarchar](max) NULL,
    [L_Extra17] [nvarchar](max) NULL,
    [L_Extra18] [nvarchar](max) NULL,
    [L_Extra19] [nvarchar](max) NULL,
    [L_Extra20] [nvarchar](max) NULL,
    [SourceCost] [money] NULL,
    [CampaignCost] [money] NULL,
    [DeliveredPass] [bit] NULL,
    [FieldReqBWAND] [int] NULL,
    [FieldSuppliedBWAND] [int] NULL,
    [FilterBWAND] [int] NULL,
    [FilterPassBWAND] [int] NULL,
    [OPFilterBWAND] [int] NULL,
    [OPFilterPassBWAND] [int] NULL,
    [ProcessBWAND] [int] NULL,
    [ProcessPassBWAND] [int] NULL,
    [L_MobileNetwork] [nvarchar](max) NULL,
    [SrcResultPass] [bit] NULL,
 CONSTRAINT [PK_tb_CampaignLead] PRIMARY KEY CLUSTERED 
4

1 に答える 1