Using the optdiag binary mode

Because precision can be lost with floating point numbers, optdiag provides a binary mode. The following command displays both human-readable and binary statistics:

optdiag binary statistics pubtune..titles.price
        -Usa -Ppasswd -o price.opt

In binary mode, any statistics that can be edited with optdiag are printed twice, once with binary values, and once with floating-point values. The lines displaying the float values start with the optdiag comment character, the pound sign (#).

This sample shows the first few rows of the histogram for the city column in the authors table:

Step  Weight              Value
  1   0x3d2810ce    <=    0x41504f204d69616d68ffffffffffffffffffffff
# 1   0.04103165    <=    "APO Miamh\377\377\377\377\377\377\377\377"
  2   0x3d5748ba    <=    0x41746c616e7461
# 2   0.05255959    <=    "Atlanta"
  3   0x3d5748ba    <=    0x426f79657273
# 3   0.05255959    <=    "Boyers"
  4   0x3d58e27d    <=    0x4368617474616e6f6f6761
# 4   0.05295037    <=    "Chattanooga"

When optdiag loads this file, all uncommented lines are read, while all characters following the pound sign are ignored. To edit the float values instead of the binary values, remove the pound sign from the lines displaying the float values, and insert the pound sign at the beginning of the corresponding line displaying the binary value.