phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "孟庆义(孟庆义)" <qingyi....@alibaba-inc.com>
Subject questions about index state transition
Date Fri, 10 Oct 2014 11:48:34 GMT
Dear:

 

       According to grammar : alter index to USABLE will cause the index to
again be considered for use in queries.

But this contract fail if we do:

1.       Create table s.t (k varchar not null primary key, v1 varchar, v2
varchar)

2.       Create index i on s.t (v1) include (v2)

3.       Explain select * from s.t order by v1 --->  CLIENT PARALLEL 1-WAY
FULL SCAN OVER S.I

4.       Alter index I on s.t usable

5.       Explain select * from s.t order by v1 ---> 

CLIENT PARALLEL 1-WAY FULL SCAN OVER S.T

    SERVER SORTED BY [V1]

CLIENT MERGE SORT

 

     In step 5 index is not considered because it’s state is “usable”
instead of “active”.

 

     After looking into the code, I have few more questions:

      1. What’s the different between ‘usable’ and ‘active’, and the
same question with ‘unusable’ and ‘inactive’

      2. I saw two index building path:

         One in method buildIndex where the state transition is “ disable
-> building -> active “

         The other in method buildPartialIndexFromTimeStemp where the state
transition is “ disable -> inactive -> active “

      So What’s the different between ‘building’ and ‘inactive’

 

      Thanks in advance

 

Daniel.meng


Mime
View raw message