Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speeding up a lookup with a large character field
Message
De
15/02/2002 23:42:53
 
 
À
12/02/2002 23:05:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00618638
Message ID:
00621051
Vues:
11
Hiya David...

Still alive in NZ... pity bout the Black Caps against SA... 'snigger'... I'm from the USA originally, so I give everyone heaps on the Rugger and Cricky... lol... I have been to Sydney, Melbourne, and Adelaide... will be trying Newcastle next year methinks...

I really love CHCH, and you are correct - it is a nice city...

As to the schema, well - some of started in DBASE II, lol... hhmm... am I aginig or are programs reverting??? And yes, as with any DB container - the SQL must be working correctly... :-)

Cheers,

Ric
>G'day Ric,
>I haven't seen that schema for deleting records for some years. It was used extensively by many people in dBase III and Foxbase II. It works really well, provided you get your SQLs working OK. Don't want those deleted records showing up in the boss's annual report :-)
>Good to see Fox alive and well in NZ. I was in Christchurch last Sept. Nice city; very similar in size to Newcastle. We also have a new direct flight service from our cities - just started last month.
>
>Regards
>David
>
>
>>Hiya...
>>
>>Well, I suppose... but, I don't 'DELETE' records... I have a delete tag on all the tables... when I tag something as deleted - I move 'dummy' data in keyfields (forex: an integer keyfield would get 9999 placed, a char field would have 'ZZZZ..' placed)... that way all of the deleted records are at the bottom...I simply reset the flag and recycle when I add new ones... Since we have large DBC tables, it saves heaps of maintenance...
>>
>>So, the way you have it is correct... but - the way I have it works for me faster than SEEK... I should have considered that... Maybe this day is too long...
>>
>>Cheers
>>
>>:-)
>>
>>
>>Ric
>>
>>
>>>Hi Rick,
>>>I've found that INDEXSEEK is slower than SEEK if SET DELETED is ON because it has to move the record pointer to check if the record is deleted and them move it back. So it will depend on her setup.
>>>
>>>
>>>>Michelle,
>>>>
>>>>... provided you are on the source table to search...
>>>>
>>>>lfound=INDEXSEEK(whatIwant, .T.)
>>>>
>>>>IF lfound
>>>> .... get the file stuff you want... the record pointer has moved there...
>>>>ENDIF
>>>>
>>>>See HELP for INDEXSEEK()
>>>>
>>>>HTH
>>>>
>>>>Ric
>>>>
>>>>>I have a cursor that contains every directory on my hard drive. Given a path, I need to find the record. Even taking a chance by limiting the field to 240 characters so I can SEEK instead of LOCATE, it's still unacceptably slow.
>>>>>
>>>>>I'm wondering if it's possible to make it faster. I thought about making a smaller key field that takes the full path and condenses it into something smaller. There are a couple problems with that, though. First, I don't have any idea how to change the path into something smaller that will still be unique. Second, whatever function does the conversion, plus the SEEK after needs to be faster than just SEEKing on the path.
>>>>>
>>>>>Anyone have any suggestions?
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Michelle
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform