Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Update-SQL is executed when using views ?
Message
From
28/01/2003 02:43:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/01/2003 12:59:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00745368
Message ID:
00746104
Views:
20
I don't know. In such cases I create an index on each of the fields.
Cetin
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform