Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Sql Server doesn't use the right index Expand / Collapse
Author
Message
Posted Wednesday, June 26, 2013 2:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 31, 2013 8:21 AM
Points: 4, Visits: 9
Hi everybody,

Some news......

I have an other index on the table prod_starts:

CREATE NONCLUSTERED INDEX [FK_prod_starts_fitgrp_id] ON [dbo].[prod_starts]
(
[fitgrp_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

This morning I discovered the select is using this. I try to disable this index and it works well, with the right index and very speed.

I don't understand why Sql Server chooses that index.
I'll wait for a week with the index disabled, I hope it changes its statistics and fixes the situation

By Marco
Post #1467506
Posted Wednesday, June 26, 2013 2:23 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:55 AM
Points: 5,233, Visits: 9,463
dazzim72 (6/26/2013)
I use the function because I have a large amount of .sql files and I prefer to store specific logic in only one point. They help me to have a simpler maintenance.

For the moment I never have had performances issue with my function.

Marco

Yes, performance problems can come on suddenly. A slight change in data can result in a totally different execution plan, and bang! You should consider converting your functions to table-valued functions.

John
Post #1467507
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse