1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Stackoverflow]

Discussão em 'StackOverflow' iniciado por fdantas, Setembro 9, 2024.

  1. fdantas

    fdantas Administrator Moderador

    [​IMG]From below query I have given all the components for index vdmod_idx1. But when I checked XREF, I can see the compiler choose vdlist since it is primary unique. May I know why it is behaving like this. I would like to know what's happening here

    And moreover, if I use index vdmod_idx1 in my query to then only it picks vdmod_idx1

    for last vdhist no-lock
    where vdhist.vddomain = dom
    and vdclassification = 1
    and vdhist.vdlist = prlt
    and vdhist.vdprod_ln = prodLn
    and vdhist.vdcurr = curr
    and vdhist.vdpart = part
    and vdhist.vdum = tt_um
    and vdhist.vdstart = date(tt_start)
    and vdmod_date > 01/01/2021
    and vdmod_time > 45556:
    end.


    Index used

    pu vdlist 10 + vddomain
    + vdclassification
    + vdlist
    + vdprod_ln
    + vdcurr
    + vdpart
    + vdum
    + vdstart
    + vdcrt_date
    + vdlocal_rsn

    vdmod_idx1 10 + vddomain
    + vdclassification
    + vdlist
    + vdprod_ln
    + vdcurr
    + vdpart
    + vdum
    + vdstart
    + vdmod_date
    + vdmod_time

    Continue reading...

Compartilhe esta Página