- DB2 database According to the statistics of the DB layer determines which index according to the query criteria, in some cases, due to unknown reasons, the index will go off, so the program can specify which of the procedures to go to avoid the index deviation of the situation occurs.
The instance code for the forced Walk index is as follows:
1 SELECTVbeln2 Zorgdn3 Vstel4 Zstaff5 Zvtweg6 vsbed zacty7 ZLIFSK erdat Lfdat as Zdtday Zebeln8 into corresponding Fields of TABLEIT_LIKP9 fromLIKPTen WHEREVbelninchS_vbeln One andErdatinchS_erdat A andLfart ='Zcre' - andVstelinchR_vstel - andZebelninchS_zebeln the andZORGDN =Space - andLfdatinchS_zpldat -%_hints DB6'<ixscan table="'LIKP"'sap_index="'Z06"'/>'."#EC ci_hints - +%_hints DB6'&substitute literals&'."#EC ci_hints - + where Vbeln in S_vbeln A andErdat in S_erdat at andLfart ='Zcre' - andVstel in R_vstel - andZebeln in S_zebeln - andZORGDN =Space - andLfdat in S_zpldat - *%_hints DB6 ' &max_blocking_factor 5& ' "#EC ci_hints in%_hints DB6'&substitute literals&'.
Strengthen indexing for DB data tables