Strengthen indexing for DB data tables

Source: Internet
Author: User

    • 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.