HP3000-L Archives

October 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Mon, 18 Oct 1999 18:41:17 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (20 lines)
Jim asks:

> The purpose of this code is to eliminate an unnecessary DBFIND/DBGET to the
>  customer data set if that customer's record is already in memory.  What I
>  want to know is should I code this, or does Image do something like this
>  already?  IOW, if I do the DBFIND/DBGET every single time, am I wasting
>  resources by forcing Image to re-read a record that may be in memory
>  already, or is Image smart enough to not do the record retrieval if the
>  record is already in memory?

IMAGE does no optimization on its own. It does precisely what you ask of it,
no more, no less. However, because a DBFIND or DBGET is not much more than a
simple file read, MPE's memory manager first looks to see if the data you
need is in main memory or not. If it's not, it will retrieve that data from
the necessary disc. But if your data is already main memory-resident, all it
does is read the data from RAM, a process that is at least 100,000 times
faster than reading from a disc.

Wirt Atmar

ATOM RSS1 RSS2