The mi_qual_const_depends_hostvar() accessor function
The mi_qual_const_depends_hostvar() function indicates whether the value of a host variable influences the evaluation of a qualification.
Syntax
mi_boolean
mi_qual_const_depends_hostvar(MI_AM_QUAL_DESC *qualDesc)
- qualDesc
- Points to the qualification descriptor.
Usage
Call mi_qual_const_depends_hostvar() in the am_scancost purpose function to determine whether a qualification function contains a host variable but no explicit constant value.
Because the database server executes am_scancost before the application binds the host variable to a value, the qualification descriptor cannot provide a value in time to evaluate the cost of the scan.
If mi_qual_const_depends_hostvar() returns MI_TRUE, am_scancost can call mi_qual_setreopt(), which tells the database server to reoptimize before it executes the scan.
Return values
- MI_TRUE
- Indicates that a host variable provides values when the function executes.
- MI_FALSE
- Indicates that the qualification descriptor supplies the constant value.
Related topics
See the description of:
- Host variables in the HCL Informix® DataBlade API Programmer's Guide, HCL Informix User-Defined Routines and Data Types Developer's Guide, and HCL Informix Enterprise Replication Guide