Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple VFP query, no optimization
Message
 
À
10/11/2000 17:26:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00440476
Message ID:
00440543
Vues:
10
>>If the original index wasn't filtered, you should have been able to use it for optimization rather than creating two new indexes on your table. Oh, well, at least you have it working now.
>>
>
>I would rather not have to add the 2 additional indexes. I have INDEXSEEK elsewhere on the the index key I already had, so now I have 3 indexes doing the duty of one. Original index expression is simple: custID + poNum. No filter. Should I not need individual indexes?

Is each PoNum unique, or do they overlap? In other words, can customer #1 have po #1, and customer #2 have po #1? If not, then you do not need an index on CustID+PoNum. To get the invoices for a customer:

SELECT * FROM PastInvoices WHERE CustID = ?lcCustID

To get a specific invoice:

SELECT * FROM PastInvoices WHERE PoNum = ?lcPoNum

Hope that helps, rather than confuses :).
Chris McCandless
Red Sky Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform