Hello all,
I have one table
schema :
SET ANSI_NULLS ONGO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ALL_DEPARTMENT_GROWTH_PROGRESS](
[RID] [INT] IDENTITY(1,1) NOT NULL,
[DISPLAY_DATE] [DATETIME] NULL,
[STAGE_ID] [INT] NOT NULL,
[USER_ID] [INT] NOT NULL,
[COUNT_CODE] [NCHAR](3) NULL,
[COUNT] [INT] NULL,
[CALC_DATE] [DATETIME] NULL,
[SIDETRACK_COUNT] [INT] NULL,
[GROUP_ID] [INT] NULL,
[DEPARTMENT_ID] [INT] NULL,
CONSTRAINT [PK_ALL_DEPARTMENT_GROWTH_PROGRESS] PRIMARY KEY CLUSTERED
(
[RID] ASC,
[STAGE_ID] ASC,
[USER_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]
GO
and table has 780559 rows ..
now , when i fires a select query on the table it takes 15 - 20 seconds to return 780559 rows.
i have clustered index on RID,STAGE_ID and USER_ID
also , i heard about reducing a logical reads can improve performance ..
heres stats..
(780559 row(s) affected)Table 'ALL_DEPARTMENT_GROWTH_PROGRESS'. Scan count 1, logical reads 5533, physical reads 0, read-ahead reads 28, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
(1 row(s) affected)
please quide me how to improve performance likewise or to reduce logical reads..
basically i am creating indexes as per execution plans suggetions and for the simple select everything looks fine in plan .
is there a trick or conditions to use index on column before actually using it in where clause or join conditions.
very excited to learn and master this ..
Thanks and Help must appreciated..
Dilip Patil..