Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed Difference
Message
 
À
08/01/2002 11:07:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00601821
Message ID:
00601994
Vues:
30
>> ...
>>The view will get ALL the records over the line, and the (again) Set Filter on the cursor will do the same as before.
>
>Perhaps I am missing something important here: Why should the view get ALL the records? A query, or view, gets only the records you request, and is therefore quite fast. However, if you use Full Rushmore Optimization, you may sometimes get all - or most - index keys, but not the records themselves. This may typically happen if you have an index on deleted().
>
>As soon as I changed from filtered tables to views, the corresponding forms, in my application, got significantly faster.
>
>Hilmar.

Hilmar, I don't think you missed something, but I didn't take the time to be 100 % clear;

I tried to say this :

The view will get all the records you select; with no select, you'll get them all. So with the filter, you'll get all that matches the filter. Right ?
Now when you use three records only out of the 100 (filtered out of 1,000), you have 97 for nothing in the cursor.
So this is about balancing between what will meet the filter, and what will be used of that.

The other thing I said, is that with (native tables) creating the view, this is done within the PC, and in order to do that, ALL the records of the table will get downloaded to the PC. So maybe here is where you disagree. Thus, first ALL the records are being read into the PC, and after that the filter will be applied in order to create the cursor. Remember, the server is dumm and can't do that (a DB-server can).

Now all is mixed, because when you don't apply the filter in order to build the cursor, you can put the filter on the cursor, and THAT will be rushmored etc.
Of course you will loose time on creating ALL the records in the cursor.

In the end what should be done (indeed) is using the index of the table, and then the view is rather useless to the respect of speed. But, depending on how much records are re-read. And now all becomes fuzzy, because the client's cache is already taking care of not going to the server again.

But please tell me what I miss, because that happens more than I like ...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform