Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for best index
Message
De
26/02/2016 20:07:22
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Looking for best index
Versions des environnements
SQL Server:
SQL Server 2014
OS:
Windows 8.1
Network:
Windows 2008 Server
Divers
Thread ID:
01632184
Message ID:
01632184
Vues:
80
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform