Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on index tag
Message
From
25/03/2005 17:23:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00999239
Message ID:
00999243
Views:
12
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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform