Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow View
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00057032
Message ID:
00057219
Vues:
38
>>>I have a parameterized view in my form's DataEnvironment that's taking 10 seconds to create in the dodefault() of OpenTables.
>>>
>>>When I reboot (to clear the cache) and run the exact same SQL statement at the command window, it takes < 1 second.
>>>
>>>Any Ideas??
>>Darren,
>>
>>Yes, there are no indexes on DELETED() and the form is using set deleted on while the command window has set deleted off.
>
>Thanks for your help, Jim, but I realize now that my assumptions were wrong. It turns out that the view is 10 times slower when it includes a calculated field.
>
>I had << trim(firstname)+" "+lastname as fullname >> in my view; I suppose now I'll have to add the fullname field into my base table and use field-level validation in the .DBC to maintain it.

Well, THAT wasn't it, either! I have an unfiltered DELETED() index, and sys(3054,1) says that everything is optimized.

Another odd thing is that using different parameters affects performance. One index returns 950 records in 1.5 seconds, while a second returns 780 records in 8 seconds (both character, regular, unfiltered, fully optimized, out of 40,000 total records).

And running the equivalent SQL-SELECT from the command window is still at least 10 times faster.

Is browsing a view slower because it's written to disk? And what other factors should I consider?

Signed, Painfully Frustrated
Darren Young
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform