Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't optimize view
Message
 
À
15/09/1998 16:59:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00137005
Message ID:
00137072
Vues:
19
Erik,
Have you tried removing the CALC field and doing a replace on the data after the cursor is complete? Calculated fields often slow SQL down. You can check it by removing it and seeing how the optimization goes.

Also, I'm assuming that IS a type in your WHERE line and your are linking Table1 with Table2 not adding a third table.

HTH
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform