Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding Rushmore optimization
Message
 
 
À
12/07/2016 09:10:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01638260
Message ID:
01638263
Vues:
84
Thank you for the explanation. This makes it clear. My example SQL Select is exactly what I am trying to optimize. So by adding index tag on REC_ID, the optimization will be done.

And speaking about "more indeces.. the longer an insert", I found that this table (ORDERS) has an index tag on DELETED(). I think I read somewhere, way, way back that it is a good idea to have this index tag DELETED(). But I never delete records in this table; this is the purpose of the REC_ID. When user "deletes" a records, the value in REC_ID is set to 'D'. So I am going to delete this index tag on DELETED(). So in balance, the number of indexes will not be increased.

Again, thank you.

>The left side of the condition in the WHERE clause must exactly match an index key. If you have multiple conditions, you must have multiple indeces to get full optimization. You'll need to determine if it's worth that. The more indeces you have, the longer an insert or update will take.
>
>Examples:
>INDEX KEY - UPPER(LastName + FirstName)
>
>WHERE UPPER(LastName) == m.LastName && UPPER(FirstName) == m.FirstName
>This will not optimize because the index key does not exactly match the left side of the condition
>
>WHERE UPPER(LastName + FirstName) == m.LastName _ m.FirstName
>This will be optimized
>
>
>
>
>>Hi,
>>
>>I was testing how Rushmore Optimization would work on the following SQL select:
>>
>>
>>=SYS(3054,1,"cmemvar")
>>select top 100 * from ORDERS where REC_ID <> 'D' order by ORDER_NO desc
>>
>>The result (content of the variable cmemvar) is "Rushmore optimization level for table ORDERS: none."
>>
>>The table does have an index tag on ORDER_NO but no index tag for REC_ID.
>>
>>Then I created an index tag for REC_ID.
>>And the result of the SYS(3054) has changed to:
>>"Using index tag REC_ID to Rushmore optimize table ORDERS
>>Rushmore optimization level for table ORDERS: Full"
>>
>>Does it mean that in order for Rushmore optimization to work EVERY field used in the WHERE and in ORDER has to have an index tag? Otherwise, Rushmore optimization does not work?
>>
>>TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform