I am wondering if reorganising a table like REORGANIZE TABLE "hades"."courses"; leads to exactly the same result as executing following 2 statements (here a recursive constraint to table courses, i. e. relationship in the data model, otherwise of course the related table) REORGANIZE TABLE "hades"."courses" PRIMARY KEY; REORGANIZE TABLE "hades"."courses" FOREIGN KEY "course_predecessor_of_fk"; Has the order of executing the above 2 statements any relevance? Best regards, Robert |
It is an excellent question.
I believe the answer is "Yes, REORGANIZE TABLE just-the-table-name does everything... it reorganizes the table and all the indexes."
The Help says this: "If an index or key is not specified, the reorganization process defragments rows in the table by deleting and re-inserting groups of rows."
AFAIK, deleting and inserting all the table rows implicitly recreates all the indexes... how could it do otherwise? :)
However, there may be some subtle differences in the effects of separate REORGANIZE statements for separate indexes.
WHATEVER THE ANSWER, the Help should be clear.
@Volker: Has this question been answered before? If anyone knows the answer to that, it's you :)
LOL, I do trust the search more than my memory, but YMMV:) - According to both sources, I don't think this question has been answered before, and I don't know the answer, either.