日期:2014-05-17  浏览次数:20539 次

请帮忙看一下 关于 两个表关联结合时 select count(*) 时数度非常忙
CREATE TABLE [dbo].[CALLOUT_BIZ_CLIENTINFO](
[SnCode] [char](36) NOT NULL,
[ClientNo] [nvarchar](50) NOT NULL,
[ProjectCode] [nvarchar](50) NOT NULL,
[ClientName] [nvarchar](50) NULL,
[Sex] [nvarchar](20) NULL,
[BirthDay] [datetime] NULL,
[Age] [nvarchar](20) NULL,
[MaritalStatus] [nvarchar](20) NULL,
[Education] [nvarchar](20) NULL,
[IdType] [nvarchar](20) NULL,
[IdNo] [nvarchar](50) NULL,
[MobieNo] [char](11) NULL,
[CoName] [nvarchar](200) NULL,
[CoAreaCode] [nvarchar](50) NULL,
[CoAddress] [nvarchar](200) NULL,
[CoPhone] [nvarchar](50) NULL,
[CoZip] [nvarchar](200) NULL,
[CoFax] [nvarchar](200) NULL,
[HoAreaCode] [nvarchar](50) NULL,
[HoAddress] [nvarchar](200) NULL,
[HoZip] [nvarchar](200) NULL,
[HoPhone] [nvarchar](200) NULL,
[LinkAreaCode] [nvarchar](50) NULL,
[LinkAddress] [nvarchar](200) NULL,
[LinkPhone] [nvarchar](200) NULL,
[LinkZip] [nvarchar](200) NULL,
[Industry] [nvarchar](50) NULL,
[Career] [nvarchar](20) NULL,
[CareerRating] [nvarchar](20) NULL,
[Position] [nvarchar](20) NULL,
[Status] [int] NULL,
[MailAddress] [nvarchar](200) NULL,
[PurProduct] [nvarchar](500) NULL,
[BrandName] [nvarchar](50) NULL,
[BrandCardType] [nvarchar](20) NULL,
[BrandCardNo] [nvarchar](50) NULL,
[BrandCardGrade] [nvarchar](20) NULL,
[BrandCardOpenDate] [datetime] NULL,
[BrandCardActiveDate] [datetime] NULL,
[BrandCardStatus] [nvarchar](20) NULL,
[Score] [decimal](18, 2) NULL,
[MonthIncome] [nvarchar](20) NULL,
[Description] [text] NULL,
[RefClientNo] [nvarchar](50) NULL,
[Email] [nvarchar](50) NULL,
[SourceType] [int] NULL,
[SourceName] [nvarchar](50) NULL,
[CreateDate] [datetime] NULL,
[CreateUserCode] [nvarchar](50) NULL,
[LastEditDate] [datetime] NULL,
[NextCallDate] [datetime] NULL,
[LastCallDate] [datetime] NULL,
[LastEditUserCode] [nvarchar](50) NULL,
 CONSTRAINT [PK_SnCode2] PRIMARY KEY CLUSTERED 
(
[SnCode] 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]


CREATE TABLE [dbo].[CALLOUT_BIZ_CLIENTINFOTASK](
[SnCode] [nvarchar](36) NOT NULL,
[ProjectCode] [nvarchar](36) NOT NULL,
[CaseCode] [nvarchar](36) NOT NULL,
[CalllistCode] [nvarchar](36) NOT NULL,
[BatchCode] [nvarchar](36) NOT NULL,
[StartPeriod] [date] NULL,
[EndPeriod] [date] NULL,
[NextCallDate] [datetime] NULL,
[DataUserCode] [nvarchar](50) NULL,
[ResultCode] [int] NULL,
[CallInType] [nvarchar](50) NULL,
[DataGetDate] [datetime] NULL,
[LastCallDate] [datetime] NULL,
 CONSTRAINT [PK_SnCode] PRIMARY KE