Normal Topic Can Sesame hold a Q&A database in memory? (Read 1143 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Can Sesame hold a Q&A database in memory?
Jun 30th, 2004 at 1:40am
Print Post Print Post  
We just added 1 gig of memory to our server and now I'm wondering what all the benefits of this upgrade may be? (Sesame speed increased minimally, but our db is still rather small)

It seems that if I 'feed' a dtf file into an array in Sesame, then we can use programming to pull data we need from it instantly without the need for xlookups and such.

Does this idea have any merit to it?

ps. Our corporate office uses Q&A daily so we are looking at various ways to get our q&a data into sesame as we SLOWLY make the transition. (Both Sesame and Q&A will be used simultaneously for many months)

Any thoughts?

Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Can Sesame hold a Q&A database in memory?
Reply #1 - Jun 30th, 2004 at 10:41am
Print Post Print Post  
If you read a file and your system has sufficient resources, the OS will try to cache that file (at least partially) in memory. So if you do a XLookup to a .dtf from Sesame, it is likely (though by no means certain), that subsequent XLookups will be from a partial memory "image" of the file in RAM. This is the reason why it is so important to "shutdown" modern OSs before powering off computers - in that the OS may not have had time to "checkpoint" or update a file held in RAM back to the filesystem on a sudden power off.

If you need to guarantee that the file is in memory, and the XLookup is to a .dtf, you will need to set up a "RAM drive", wherein the OS allocates a specific portion of memory to act as a lettered (in WinDos) hard drive. This technique was quite common in the days of slow hard drives, but is getting rare now-a-days.

Note (for reference): If you are doing a XLookup to a Sesame .db file, it is automatically held in memory for subsequent lookups.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Can Sesame hold a Q&A database in memory?
Reply #2 - Jun 30th, 2004 at 11:57am
Print Post Print Post  
Quote:
Note (for reference): If you are doing a XLookup to a Sesame .db file, it is automatically held in memory for subsequent lookups.


This may be a silly question but if  Sesame is using data that is held in memory if I make changes or additions to the data that is contained in the Sesame .db file that is being used for the  XLookup how does Sesame know to use a fresh copy instead of the one held in memory?

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Can Sesame hold a Q&A database in memory?
Reply #3 - Jun 30th, 2004 at 12:28pm
Print Post Print Post  
That is why only one server (even if standalone) is allowed to access any one application at a time. The "current" application is the one being accessed by its server (in memory), not the application file sitting on the hard drive. Of course, if any changes are made by that server, the change is written to the file immediately.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged