HG Delete Operations

SAP Sybase IQ chooses one of three algorithms to process delete operations on columns with an HG (High_Group) index.

HG Delete Costing

The delete cost model considers many factors including I/O costs, CPU costs, available resources, index metadata, parallelism, and predicates available from the query.

Specifying predicates on columns that have HG, LF, or enumerated FP indexes greatly improves costing. In order for the HG costing to pick an algorithm other than large delete, it must be able to determine the number of distinct values (groups) affected by deletions. Distinct count is initially assumed to be lesser of the number of index groups and the number of rows deleted. Predicates can provide an improved or even exact estimate of the distinct count.

Costing currently does not consider the effect of range predicates on the large delete. This can cause mid delete to be chosen in cases where large delete would be faster. You can force the large delete algorithm if needed in these cases, as described in the next section.

Using HG Delete Performance Option

You can use the HG_DELETE_METHOD option to control HG delete performance.

The value of the parameter specified with the HG_DELETE_METHOD option forces the use of the specified delete algorithm as follows:
  • 1 = Small delete

  • 2 = Large delete

  • 3 = Mid delete

  • DML_OPTIONS5 = 4 (Disable Push Delete Predicates) Default 0 — Disables pushing range predicates to the HG large delete.

For more information on the HG_DELETE_METHOD database option, see “HG_DELETE_METHOD option” in “Database Options” in Reference: Statements and Options.

Related concepts
WD Delete Operations
TEXT Delete Operations