Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

When you change the justification of a column, is the index rebuilt?

edited June 4 in OpenInsight
Does changing the justification of an indexed column automatically rebuild the index? I ask because the keys returned by btree.extract when the column was right justified were different to the keys returned by btree.extract when the column was left justified. How could this have happened without an index rebuild? I used the >= operator.

Comments

  • IMHO
    >>Does changing the justification of an indexed column automatically rebuild the index?
    No
    It is up to you to schedule a rebuild
  • Then how did the keys returned by btree.extract change?
  • IMHO again
    Therefore I assume the formatting of the keys list uses the dict format. A rebuild would only be be required if the format change of the key field affected the search. i.e. using alpha search of numeric data. (or some such)

    I will now bow out and leave to others with more tecnical knowledge explainations.
  • @josh - Barry is correct. Changing the justification of a column does not rebuild the index. However, it can change the way the index is queried. Can you confirm that your queries are accurate based on the change in justification?
  • edited June 5
    actually, i think Don is right.

    It just so happens that both justifications result in a btree structure(ordering) that is correct for my use case, but the btree extract must be using the number definition of >= rather than lexical definition, so that's the difference.

    I am trying to get all keys that start with G3...
    Using the "number" >= doesn't work, but lexical >= does. The btree structure itself doesn't change though.
  • The justification of the index is given in the first field of the index control record (the indexName record in the !file). This is initially determined from the justification specified in the dictionary item for the index when the index is created, but would not be changed if the dictionary justification was changed. Deleting the index and recreating it would make it consistent with the dictionary.
Sign In or Register to comment.