Click here for MiniSoft Sponsor Message

HP engineer outlines IMAGE B-tree technical capabilities

Editor's note: HP database engineer Bharati Desai has gathered a good deal of the input from customers during the past year to help create the new B-tree indexes in TurboIMAGE. Her article here is taken from the newsletter of SIGIMAGE, a special interest group of users of TurboIMAGE and IMAGE/SQL. Any customer making use of an HP 3000 and IMAGE should belong to SIGIMAGE -- it's the best way to have input on IMAGE enhancements like B-trees. Membership in SIGIMAGE is free. To join, call Leah Robertson at Interex, at 408.747.0947, or send e-mail to sigs@interex.org.

By Bharati V. Desai
HP CSY Lab

The need for generic key searches and range searches has been recognized by IMAGE customers for some time. This is why the request for B-trees in IMAGE/SQL has consistently been the most desired enhancement of the SIGIMAGE list.

Continuing with the prevailing tradition in the IMAGE Lab, the input for the external design of B-trees was obtained from several customers during (and after) IPROF '96. We believe that the final implementation addresses the primary needs of the majority of our IMAGE customers. Our objective has been to provide this new feature and give you as much flexibility as possible to control the use of it. Enhancements include:

Remember that with more indices, there is more overhead for puts/deletes/updates, as well as increased complexity for the SQL Optimizer (The INDEX for the query is chosen by the SQL Optimizer and cannot be overridden by the user.)

The enhancement highlights demonstrate that B-trees can accomodate a variety of customer needs that exist in a single computing environment. Furthermore, there are many ways you can start using this enhancement.

How to get started quickly
For sophisticated use of B-trees, especially for range searches for numeric items, you will need to make application changes. More detailed information on advance use is beyond the scope of this article. However, if you desire generic search only and want to get started quickly without making any application changes, you may employ the following approach.

First, you must identify the masters that need B-trees. Then, you must create B-trees using one of the following two methods:

For new databases, use the new INDEXED option of DBSCHEMA, with the following syntax: Name: setname,

[/indexed]

[(read-class-list)/(write-class-list)]

[,device-class];

For example: Name: Employeename, manual /indexed

(10,20/30);

For existing databases, use the new ADDINDEX command of DBUTIL.with the following syntax: addindex basename [/maintword]

for where setnamelist := setname[,...] and setnumlist := setnum[,...]

For example: >Addindex orders/secret for ALL >addindex orders/secret for 1,7 >Addindex orders/secret for SalesrepName,Region, District

BTREEMODE1 option: Set the BTREEMODE1 option ON using DBUTIL with the following syntax: set dbname[/maintword] BTREEMODE1=< on | off> [,[wildcard=]c] where "c" is any printable ASCII character. Notice that "wildcard=" is optional (i.e., you can type the wildcard character by itself).

For example: set orders/secret BTREEMODE1 = on
set tape/pass BTREEMODE1 = on, @
set cust/boss BTREEMODE1 = on, wildcard = *

Now you are ready to perform a B-tree search. If your database is new, you will need to add data. After that, you can include the wildcard character in your DBFIND argument and start observing the results.

Are you hungry for more? The above method is the quickest and simplest way to benefit from B-trees. More information on advanced use of B-trees will be made available later via different media.

If you are interested in beta testing the B-trees enhancement, please send me an e-mail message, copying your HP support person: bharati@cup.hp.com


Copyright 1996, The 3000 NewsWire. All rights reserved.