Table of Contents

Search

  1. Preface
  2. Introduction
  3. Defining a System
  4. Flattening IDTs
  5. Link Tables
  6. Loading a System
  7. Static Clustering
  8. Simple Search
  9. Search Performance
  10. Miscellaneous Issues
  11. Limitations
  12. Error Messages

Expensive Searches

Expensive Searches

Relate can be used to identify expensive searches. When started with the
-s
switch, it will produce two histograms showing:
  • search transaction duration (in 50 millisecond groups)
  • result set size (groups of 20 records)
For example,
relate> Search Duration Histogram relate> 0.050 sec 999 99.90% relate> 0.100 sec 0 99.90% relate> 0.150 sec 1 100.00% relate> Total elapsed time: 5.547 sec relate> Result Set Histogram relate> 20 recs 1000 100.00% relate> Reads 1000 relate> Writes 1386
This histogram shows that 999 searches were executed in less than 50 milliseconds and one search completed in less than 150ms. All searches returned less than 20 records.
The first search of the session usually incurs extra "set up" overhead, including connecting to the database, and is usually slower when compared to the other searches. This can be verified by running relate with the
-ss
switch which produces individual transaction timings:
relate> Txn 1 0.109 sec relate> Txn 2 0.016 sec relate> Txn 3 0.000 sec relate> Txn 4 0.000 sec relate> Txn 5 0.000 sec relate> Txn 6 0.015 sec relate> Txn 7 0.000 sec relate> Txn 8 0.016 sec relate> Txn 9 0.000 sec relate> Txn 10 0.015 sec
The Search Transaction Histogram can be used to get a general feel for the cost of the search strategy.
In general, the cost is proportional to the number of candidates selected by the Search-Logic.
Individual transaction timings are useful for locating expensive searches. Once the expensive search record is found, use the methods documented under "Tracing a Search" to locate the cause.
The Result Set Histogram can be used to determine the optimal size of the sort memory (
SORT=
parameter of the Search-Definition).

0 COMMENTS

We’d like to hear from you!