# efficient database access

**URL:** <https://techcommunity.softwareag.com/t/efficient-database-access/97910>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Performance\
**Created:** [August 2, 2011, 6:38am UTC](https://techcommunity.softwareag.com/t/efficient-database-access/97910 "2011-08-02T06:38:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![irene\_hermia](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@irene\_hermia](https://techcommunity.softwareag.com/u/irene_hermia)\
**Post date:** [August 2, 2011, 6:38am UTC](https://techcommunity.softwareag.com/t/efficient-database-access/97910/1 "2011-08-02T06:38:06Z")

</div>

HI,

```
i am a new to natural/adabas. I just want to know which is the most efficient database access among read physical, read logical, read by isn, histogram and find, or does it depends on when and how you are going to use it... Please enlighten me.. Thanks

```

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [August 2, 2011, 11:28am UTC](https://techcommunity.softwareag.com/t/efficient-database-access/97910/2 "2011-08-02T11:28:50Z")

</div>

Hi,

as a rule of thumb you use FIND to select one or a few specific records and READ for mass data processing. But to be honest this is almost oversimplified.

Please get more specific information in the natural programming guide.  
[http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat427mf/pg/pg\_dbms\_ada.htm](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat427mf/pg/pg_dbms_ada.htm)

Matthias

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [August 2, 2011, 5:03pm UTC](https://techcommunity.softwareag.com/t/efficient-database-access/97910/3 "2011-08-02T17:03:16Z")

</div>

“Please enlighten me”

Enlightenment does not come from the answer to a single question. It comes from education (Adabas and Natural).

Here is a sample list (almost assuredly incomplete) of what you should know with regard to Adabas: (others, please add to list)

Associator  
Inverted Tables  
ACT (Address Converter Table)  
Descriptors  
Data  
Arbitrary placement  
Variable length vs fixed length  
MUs (Multiple valued fields)  
PEs (Periodic Groups)  
Null Suppression (esp as it relates to descriptors, MUs, and PEs)  
ISNs (user assigned, adabas assigned (reusable and non reusable))  
Direct Calls (not necessarily to write, but to understand)  
Control Block  
Format, Record, Search, Value Buffers  
Transaction Logic  
Update & hold logic  
Read Physical, Logical, BY ISN  
FIND search criteria and algorithms  
Super, Sub, and Hyper descriptors

And finally, and most important of all, the name of the person(s) in your shop most familiar with Adabas and Natural.

steve

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [August 2, 2011, 5:20pm UTC](https://techcommunity.softwareag.com/t/efficient-database-access/97910/4 "2011-08-02T17:20:28Z")

</div>

It depends.  
Read physical requires the least resources on behalf of Adabas to get you a record. But since you can not specify any criteria, you get a random record.  
So unless you want to read all the records of a file (in random order and with the risk of getting records twice, if somebody else can update the file) read phyisical is rarely useful from an application point of view.  
Histogramm does not access DATA.  
The performance difference between read logical and find is often over-judged and does rarely matter much. Of course there are functional differences.  
In general just concentrate on your application logic.

Rainer Herrmann

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:00pm UTC](https://techcommunity.softwareag.com/t/efficient-database-access/97910/5 "2021-04-02T15:00:41Z")

</div>


