Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What are the best indexes to have for a filter ?
Message
De
11/01/2005 15:54:49
 
 
À
11/01/2005 15:29:22
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
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00975956
Message ID:
00976150
Vues:
8
>That would depend on how many records are selected in the first phase, right? I suspect that if many records are selected in the first phase, it might get quite slow. I believe you have managed to avoid this.

Yes, I avoided that by sorting my array, as I wrote. Anyway, my solution is generic, so I have made a function out it, I use this function many places in my systems. It has saved me a lot of time of programming, and my searches are always at least partially optimized.
>
>I think that creating a single query with a combined condition would be still faster, but quite often, it is better to do whatever is fastest to program.
>
>>No, on the contrary, it's very fast! Notice that the first search is fully optimized, and the next searches are done in RAM. In my case I have a table with about 6 million records, and the search is always immidiate. In reality the total speed depends on how many records you get in the first SELECT. In my system I have a function to sort the laCondition array so the longest condition is in the first element, since this condition normally will get fewest records which is a plus.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform