SQL/MX 2.x Query Guide (G06.24+, H06.03+)
Accessing SQL/MX Data
HP NonStop SQL/MX Query Guide—523728-003
2-12
MultiDimensional Access Method (MDAM)
•
Place all statements affected by the forced shape in separate modules, called as
services by other modules.
MultiDimensional Access Method (MDAM)
The MultiDimensional Access Method (MDAM) provides optimal access to certain
types of information when predicates contain key columns. Based on the predicates
you specify, MDAM reads the minimal set of records and retrieves rows in key order,
allowing the optimizer to avoid sorts when it can and to do merge joins. MDAM is
costed by the optimizer whenever a key predicate is contained in the query and
statistics exist for the key. The decision to choose MDAM is based on whether the
access is less expensive than single subset access.
Use MDAM to:
•
Save indexes. With MDAM, you need fewer indexes and so can save the
maintenance and space associated with extra indexes.
•
Save resources.
•
Obtain good performance in situations where previously a full table scan was
needed.
•
To add rows to a table without suffering performance penalties.
Specifying MDAM
MDAM is enabled by default. Enable means that the SQL/MX compiler can choose to
use MDAM if it will provide a better quality plan. Several SQL/MX compiler control
settings affect MDAM:
•
CONTROL QUERY DEFAULT provides a system-wide “master” switch for the
current session. You can switch MDAM off or on and enable MDAM if it is disabled.
•
With CONTROL QUERY SHAPE, you can force columns to be used by MDAM,
and you can also force enumeration algorithms. For more information about
enumeration algorithms, see MDAM’s Use of DENSE and SPARSE Algorithms on
page 2-17.