Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on index tag
Message
 
 
À
25/03/2005 17:23:28
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 6 SP5
Database:
Visual FoxPro
Divers
Thread ID:
00999239
Message ID:
00999247
Vues:
14
The space for the index tag is not a problem, in my case. 10000 records is not such a big table, even if I add a tag for the field of 40 char. I need this tag for user to dynamically search (like in a lookup window) - user types letters and the program moves the grid to the desired record, as he/she types. Having only 20 char in the index tag is not a problem since the user will almost never have to type so many characters to get to the desired record. But I still don't know if the function SUBSTR() in the index tag will slow it more for maintaining than having the entire field in the tag or the other way around.

Thank you for your input.


>The main performance problem, I think, is that the index tag has to be updated every time you add or modify a record. We can assume that this will take longer for larger index tags.
>
>I haven't seen this to be a problem in practice; I would be more concerned about disk space, and about the ease of managing the application. This latter will be easier if you just use the entire field.
>
>Disk-space should not be a problem under the conditions you mentioned, but it might be a problem with larger tables. Not so much disk space per se, but the possibility of going above the 2 GB limit.
>
>Also, depending on what you want to use the index tag for, you may not need it at all. If it is for a report, to show the data in a certain order, just SELECT the appropriate data, including an ORDER BY clause.
>
>This is one situation where I used to use indices a long time ago (dBASE and FoxPro) but don't do so now.
>
>>I need to add an index tag to a VFP table (part of VFP database). The field is type C, 40. I am always concerned that if I create an index on the entire field (of 40 char length), it will slow down the opening/updating/maintaining the table. I thought that maybe I should create an index tag only on the first 20 characters. Like
>>
>>index on upper(substr(MYFLD,1,20)) tag MYTAG
>>
>>
>>Is it better? Or by adding the SUBSTR() expression I am loading the index tag anyway? The table, by the way, will have max of about 10,000 records.
>>
>>Thank you for any suggestions.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform