Skip to main contentSkip to search
Powered by Zoomin Software. For more details please contactZoomin
Progress DocumentationProgress Documentation
Progress Documentation
  • Home
  • Home
  • EnglishČeštinaDeutsch (Germany)Español (Spain)FrançaisItaliano (Italy)Português (Brasil)日本語Русский (Russia)中文 (简体) (China)中文 (繁體, 台灣) (Taiwan)ar-AR
  • Login

Use ABL Database Triggers and Indexes

When TABLE-SCAN is recommended instead of WHOLE-INDEX

Save PDF
Save selected topicSave selected topic and subtopicsSave all topics
Share
Share to emailCopy topic URL
Print
Table of Contents
  • Database Triggers
    • Trigger definition
    • ABL database events
    • Schema and session database triggers
    • Best practices for ABL triggers
  • Database Index Usage
    • Find out which indexes are used
    • Maintain indexes through ABL
    • Use the ABL ASSIGN statement
    • Indexes and Unknown values
      • Examples
    • Indexes and case sensitivity
    • How ABL chooses and brackets indexes to satisfy queries
      • Background and terminology
      • Case 1: WHERE searchExpr
      • Case 2: WHERE searchExpr AND searchExpr
      • Case 3: WHERE searchExpr OR searchExpr
      • General rules for choosing a single index
      • Bracketing
    • Search without index
      • When TABLE-SCAN is recommended instead of WHOLE-INDEX
      • When TABLE-SCAN is not recommended to be used
    • Index-related hints
Table of Contents

When TABLE-SCAN is recommended instead of WHOLE-INDEX

Save PDF
Save selected topicSave selected topic and subtopicsSave all topics
Share
Share to emailCopy topic URL
Print
  • Last Updated: January 17, 2024
  • 1 minute read
    • OpenEdge
    • Version 12.8
    • Documentation

The following example demonstrates when TABLE-SCAN is recommended instead of WHOLE-INDEX

DEFINE TEMP-TABLE mytable NO-UNDO
FIELD name AS CHARACTER
FIELD id1 AS INTEGER
FIELD qty AS INTEGER
FIELD id2 AS INTEGER
INDEX idix id1.
FOR EACH mytable TABLE-SCAN:
 myaggregate_function(mytable)
END.

If TABLE-SCAN is used, AVM scans all the records by accessing record blocks only; while if TABLE-SCAN is not specified, then WHOLE-INDEX is used and AVM scans all the records by accessing index blocks and record blocks. So instead of accessing index blocks and record blocks, with TABLE-SCAN, you only access the record blocks.

TitleResults for “How to create a CRG?”Also Available inAlert