Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index not kicking in JOIN
Message
De
02/03/2015 12:23:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Index not kicking in JOIN
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01616092
Message ID:
01616092
Vues:
42
Hi,

I'm doing a query which joins a customer table to a sales table (cab_inv) and for some reason the join doesn't want to pick up an index on customer number on the sales table (simple index on cust_num, index "cust_num2"), if I do a simple select only on the sales table and include in the where clause the customer number it picks up the index, now to make it more interesting if I go back to the join and I hard-code the customer number then the index is used. Any clues? image below and the optimizations, the first 4 lines is for the select on the sales table only and the index "cust_num2" kicking in, the rest if for the join and the index not kicking in.

Thanks!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform