Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home Accelerate Tutorials Travels with Mark: A Hitchhiker's Guide to the UniVerse, Part 2: Sizing hashed files in UniVerse

Travels with Mark: A Hitchhiker's Guide to the UniVerse, Part 2

Page 1 of 15 Go to the next page

Sizing hashed files in UniVerse


Level: Intermediate

Mark Baldridge ( mbaldridge@rs.com), Principal Consultant, Rocket Software

Before you start

This tutorial builds upon the first tutorial, which introduced the UniVerse Profiler for building unit-performance tests. The Profiler comes as an unmodified Ideal flavor account, which uses a mixture of Information, Pick, and Reality-style syntaxes for different commands and code. You can use any flavor of account, adjusting code for the appropriate syntaxes, by adding VOC entries to provide syntax-compatible commands such as CREATE.FILE, or routines to hide the flavor differences. Tests that examine the difference in performance of flavor-specific behavior control that behavior with $OPTIONS compiler directives.

Code examples use mixed-case, or camel-back, variable names, with an initial capital letter. Language constructs and keywords appear in lower case. The LOGIN paragraph turns off case inversion. The program, Keywords, in the Bp file, copies all of the keywords and the VOC file pointer to their lower-case counterparts if you want to set up your own account.

Before you start building and running tests, enter the Profiler account and execute the BuildAll paragraph. This properly initializes any platform- or release-specific differences in your environment.

About this series

The subject matter of this series of articles and tutorials on UniVerse performance tuning arises from visits to customer sites. The issues raised do not disparage the customer, but reflect a real-world predicament. The typical developer or DBA has so many outstanding tasks that by the time one task is complete, at least one more has joined those remaining. They all demand attention. Sufficient time usually exists to make something work, but typically not enough to make it work well. As companies avoid excess administration staff, this is true for UniVerse DBAs or the many more DBAs that it takes to run a comparably-sized shop using another database.



About this tutorial

Have you ever found a file you cannot size properly? Does it have lots of really large records and small records? No matter what you try, the FILE.STAT reports the file has groups over 200 percent full? Are you wondering how many records should you have in a group block? Do access patterns affect your decisions?

People with expert opinions on sizing hashed files resemble the blind men with the elephant. Having felt a leg, one describes an elephant as a telephone pole; another with the trunk describes a snake. Yet another with the ear likens an elephant to a leather rug. People develop rules of thumb that size files well in their application environments. However, applications produce files with only subsets of performance factors.

This set of tutorials on file sizing explores the impact of factors that affect performance. These tutorials extend the foundation laid in the initial tutorial, Profiling the UniVerse. This tutorial builds a set of tests to measure these impacts so that you will understand why your rules of thumb work, and examines those cases where a different choice might improve performance. You can download the UniVerse account containing the tests.


 


Objectives

In this tutorial, you begin to explore the factors that affect file performance. You start by examining the file structure so that you can design tests for using records in the primary group. These tests measure the write time for different separations. Then you move on to tests that highlight the impact of overflow.

In the third tutorial of the series, you will examine the file structure of oversize records and gain an understanding of the balance between increasing separation and access patterns of normal records that fit within a single group block and oversize records that exceed a group in size. In the fourth installment, you will examine select performance from a standpoint of file sizing, and wrap up with some techniques that address the issues you have investigated.


 

System requirements

This tutorial requires an installation of UniVerse. You should have a familiarity with writing and compiling UniVerse BASIC programs.

 

Page 1 of 15 Go to the next page
Document Actions