Andrew McIntyre wrote:
The only time the statistics for an index are guaranteed to be up to date is when the index is created. See: https://issues.apache.org/jira/browse/DERBY-737 https://issues.apache.org/jira/browse/DERBY-269 Creating the index before loading the table with data means that the statistics for the table will correspond to an empty table. The table needs to be loaded with data, and then the index created afterward.
Thanks for asking the question about indexes, Bryan. And thanks to Andrew for answering the question and for providing Jira entries. I've included the above text as a footnote in the latest html document for DERBY-805 (_v5.html).
And many thanks to both of you for taking the time to read this rather daunting document; I do appreciate the feedback...
Army
