Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Hi Cetin, Thanks for your reply.
I think that my question must have an example:
I am not using have a table with index built on expression Field1 + Field2
In the View Designer, I can build the Filter condition like this:
Field1 + Field2 = lcParam1 + lcParam2
When I use the view , Rushmore uses the index based on that expression.
But, when I update records and SQL Where clause includes Key Fields only, Rushmore doesn't use the index because the Where Clause that VFP builds must be something like this :
WHERE Field1 = MyView.Field1 ;
AND Field2 = MyView.Field2
There is no optimizable expression here and Rushmore doesn't use the index based on Field1 + Field2
My Question is How do we know the Expression that VFP Builds when sending updates from View to DBF tables ?
Thanks,
Juan
>>Hi all,
>>
>>We know the Select-SQL command when a view is used and we have control on rushmore optimization level by creating expressions, but I don't know whether we have a way to know what VFP does when updating tables based on parameterized views, I mean, when we do a TableUpdate()
>>
>>Sys(3054,1) reports Rushmore optimization levels when selecting and updating records from tables based on views but it may report that different indexes are being used.
>>
>>I think that Update-SQL's WHERE Clause is built on a Field by Field basis (View Designer: "SQL Where clause includes Key Fields Only") , not expressions, is this correct ?
>>
>>Thanks
>>
>>Juan C.
>
>When it's "key fields only" it only uses key fields to locate update record. Otherwise a long where clause is built as shown in the documentation (except "key fields and timestamp"). See "Management of Updates".
>Cetin
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement