Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for best index
Message
From
26/02/2016 20:07:22
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Looking for best index
Environment versions
SQL Server:
SQL Server 2014
OS:
Windows 8.1
Network:
Windows 2008 Server
Miscellaneous
Thread ID:
01632184
Message ID:
01632184
Views:
81
I have this select:
DECLARE @NoEntity Int
DECLARE @VehicleMake Varchar(30)
DECLARE @VehicleModel Varchar(30)

SET @NoEntity=19
SET @VehicleMake='VOLKSWAGEN%'
SET @VehicleModel='"CABRIOLET*"'

SELECT Client.PrimaryKey
 FROM Client (NOLOCK)
 WHERE Client.NoEntity=@NoEntity AND Client.VehicleMake LIKE @VehicleMake AND Contains (Client.VehicleModel, @VehicleModel)
This failed to respond within 5 minutes on the production.

The table has 4 million records

We have indexes on all fields and a full text index on VehicleModel.

Usually, the execution plan would tell us, shown in green, an optimized index to build. In this case, no suggestion is shown.

So, we would normally remove the related indexes and then, the execution plan would be able to react and tell us a recommended index.

In this case, I cannot do that as one of the indexes is the primary key and that primary key is also used in the full text.

What can I do to see what would be the recommended index?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform