Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I read tables content into memory
Message
 
 
To
31/03/2001 03:55:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00490509
Message ID:
00490585
Views:
12
>>Hi everyone,
>>
>>My colleague suggested to put our small lookups table content into memory, which would speed up the Database validation job. How this could be done?
>>
>>Thanks in advance.
>
>Nadya,
>Another thought. If they're static you could include them in project so they would be part of exe. I didn't make any speed test though and would hate static lookups.
>Cetin

These lookups are pretty much static. It's unusual to add a new code. We run a validation job (e.g. fire validations on each record each field) in all tables in a database. This process takes too much time (more, than 8 hours), so we're looking into ideas of optimizing the code. Currently, each function checks, if needed lookups table is open, if it's not, it opens it and log into logfile. Obviously, there is no need for this, if all these tables could be opened once at the beginning of the process. There are lots of other problems with this application, for instance, it uses index with ALLTRIM in it, etc.

My colleague suggested to open all tables in advance (this is obvious, but important suggestion) and she also proposed to load them into memory.

The code of functions, which checks coded field, currently looks like:
  lparameter pcField
  =ValOpen("Usage")
  if !indexseek(pcField,.f.,"Usage","code") && Invalid code
     return EvalCode(14)
  endif
  return .t.
BTW, it's not my application, but I just want to summarize the ideas.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform