Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't optimize view
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00137005
Message ID:
00137073
Views:
24
After looking at my answer, I think your problem is really with the "Field1 > Field2" code. Your index evaluates to .T. or .F., so you'll need to match that result with .... AND (Table1.Field1>Table1.Field2) = .T......

Barbara

>I have a view created with synatax like the following:
>CREATE SQL VIEW myView AS;
>SELECT table.field1, table1.field2, table2.field1,;
> table1.field1-table1.field2 as calc;
>FROM table1,table2;
>WHERE table1.fk = table.pk;
>AND table1.field1 > table1.field2
>
>I have indexes on the fields used in the join, and an index on table1.field1 > table1.field2.
>This view runs extremely slowly, and SQL Showplan shows that there is no optimization on either table.
>
>What else can I do to speed this up?
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform