Editor Options (2 of 8) panel
You use the Editor Options panel (2 of 7) to set your default editor options.
Panel and field definitions
- Use row count value
- This
option influences Db2® optimization.
When FM/Db2 prepares an SQL statement to access Db2® data, the number of rows in the result table may affect the method used by Db2® to produce the result table. In some cases, Db2® uses a different, more efficient, access method if it is known that only a few rows of an otherwise very large result table are required. This option enables an additional clause to be added to the SQL statement used by FM/Db2 when accessing Db2®. The OPTIMIZE FOR nnn ROWS clause is documented in the SQL Reference manual for the appropriate version of Db2®. The default is selected.
Enter a number in the range 0-999999 inclusive. This option and the Use row count value option combine in these ways:
- Use row count value option selected
- The value specified for Row count on the editor function entry panel is used, unless ALL (also 0, *) is specified. In the latter case, the Optimize for value is considered. A zero value results in no a OPTIMIZE FOR clause. Any other value results in an OPTIMIZE FOR nnn ROWS clause being added. nnn is the value entered in the Optimize for option. The default for the Optimize for option is 0.
- Use row count value option not selected
- The Optimize for value is considered. A zero value results in a no OPTIMIZE FOR clause. Any other value results in an OPTIMIZE FOR nnn ROWS clause being added. nnn is the value entered in the Optimize for option
- Scrollable cursor type
- Controls
the access method used by FM/Db2 when processing large Db2® objects.
The FM/Db2 editor can operate in two modes. When there is sufficient memory available, FM/Db2 loads all of the rows for the result table into the editor. For Db2® objects with large result tables, FM/Db2 loads only a small number of rows initially and keeps only a small number of rows in memory during the editor session. This is achieved using Db2® scrollable cursors. The type of cursor specified can influence the behavior of the editor, particularly in edit mode. The default is 1 (Insensitive).
- 1. Insensitive
- An insensitive cursor operates like a point-in-time snapshot of the result table. The number of rows in the result table is fixed, and is not changed by insert, update, or delete operations made to the table by other processes. FM/Db2 always uses an insensitive cursor in browse or view modes.
- 2. Sensitive static
- A
sensitive static cursor also has a fixed number of rows in the result
table, however delete and update operations made using the cursor
are reflected the next time the row is processed by the cursor. In
addition, update and delete operations made to the underlying table
may cause the row to be no longer visible when processed by the cursor.
A sensitive static cursor is only used in edit mode.
- Sampling type
- Controls
whether data sampling is used. Data sampling enables a subset of the rows in a Db2® object to be loaded into the editor. The default is 1 (None). The possible values for this option are:
- 1. None
- All rows of the object are eligible for inclusion, this is the default.
- 2. Clustered sampling
- A specified number of rows are loaded into the editor.
- 3. Random sampling
- Each row of the object is considered for inclusion in the editor. A random number generator and a frequency are used to determine whether the row is actually loaded.
When data sampling is selected, you also need to consider these options:
- Sampling limit
- For both clustered and random sampling.
- Initial skip count
- For clustered sampling.
- Include count
- For clustered sampling.
- Skip count
- For clustered sampling.
- Sampling frequency
- For random sampling.
- Sampling seed
- For random sampling.
- Clustered Sampling
- Clustered data sampling divides the data into consecutive groups
of rows. The number of rows in each group is the sum of these values:
- Initial skip count
- Include count
- (Final) skip count
Within each group, the number of rows specified in Initial skip count are ignored. The number of rows in Include count are sampled (added to the editor session). Finally, the number of rows specified in the Skip count are ignored. Sampling then recommences with the next group of rows.
These options apply only to clustered data sampling. Any values specified are ignored when clustered data sampling is not in use.
- Initial skip count
- Controls how many rows are initially skipped in each clustered sample group. It can be zero, or a positive integer. The default is 0.
- Include count
- Controls how many rows are sampled in each clustered sample group. It must be a positive integer. The default is 1.
- Skip count
- Controls how many rows are skipped at the end of each clustered sample group. It can be zero, or a positive integer. The default is 0.
- Random Sampling
- Random
data sampling uses a random number generator, together with the sampling
frequency to determine whether a row is included in the sample. These
options apply only to random data sampling. Any values specified are
ignored when random data sampling is not in use.
- Sampling limit
- A value that sets a maximum for the number of rows in the data sample. A zero value indicates that there is no limit on the number of rows in the data sample. The default is 0.
- Sampling frequency
- Controls
the sampling frequency for random data sampling. The
default is 0.01.
Enter a value in the range 0.000000001 to 0.999999999 inclusive. To sample approximately 10% of rows enter a frequency of 0.1. To sample approximately 1% of rows enter a frequency of 0.01.
- Sampling seed
- A
value used to initiate the random number generator used for random
data sampling. The default is 0.
Enter a integer in the range 0 to 2147483647 inclusive. A zero value indicates that FM/Db2 should use the system clock to initiate the random number generator. Specify a zero value, when repeatability of data samples is not required. Any non-zero value used to initiate the random number generator ensures that data samples are repeatable, given the same table and other input conditions.
Parent panels
parentpanels shown below. To go to the Editor Options (2 of 8) panel, you then press the NxtPage function key (F11).
You can only display the Editor Options (2 of 8) panel if the Optimization, large table and data sampling options option on the Editor Options (1 of 8) panel is selected.
Child panels
To display this panel… | Use/do this |
---|---|
Editor Options (1 of 8) panel | Press the PrvPage function key (F10) |
Editor Options (3 of 8) panel | Press the NxtPage function key (F11) |