[
https://issues.apache.org/jira/browse/DERBY-5684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273654#comment-13273654
]
Dag H. Wanvik commented on DERBY-5684:
--------------------------------------
Looked at the latest patch - seems to do what you describe to me :) Some
comments and questions:
FromBaseTable:
- for (int i=0; i < cds.length; i++) {
ConglomerateDescriptor tmpCd = cds[i];
if (tmpCd.isIndex()) {
IndexRowGenerator irg = tmpCd.getIndexDescriptor();
// The case where we have a table with a
// single-column primary key/index is pretty
// common, so avoid engaging the istat daemon.
if (!irg.isUnique() ||
irg.numberOfOrderedColumns() > 1) {
qualified = true;
break;
}
}
}
I think I'd reverse the logic here for clarity to:
for (int i=0; i < cds.length; i++) {
ConglomerateDescriptor tmpCd = cds[i];
if (tmpCd.isIndex()) {
IndexRowGenerator irg = tmpCd.getIndexDescriptor();
// The case where we have a table with a
// single-column primary key/index is pretty
// common, so avoid engaging the istat daemon.
if (irg.isUnique() && irg.numberOfOrderedColumns() == 1) {
continue;
}
qualified = true;
break;
}
}
- IndexStatisticsAnalyzer:
> Without this restriction the algorithm will drop valid statistics entries.
Change wording to "would drop".
Essentially a set: qualifiedCds, implement as such? (e.g. "contains" predicate
cleaner than a search loop).
What scenario corresponds to this latter case below (irg == null):?
if (!cd.isIndex() || irg == null) {
return DISQUALIFIED;
}
- IndexStatisticsDaemonImpl:
// TODO: Is it ok to always invalidate, or should logic be different
// for background and explicit mode?
What are the pros and cons here? I would assume both should invalidate?
> Explore possible istat daemon improvements and optimizations
> ------------------------------------------------------------
>
> Key: DERBY-5684
> URL: https://issues.apache.org/jira/browse/DERBY-5684
> Project: Derby
> Issue Type: Task
> Reporter: Kristian Waagan
> Attachments: derby-istat-exploration-1.diff,
> derby-istat-exploration-2.diff, derby-istat-exploration.diff
>
>
> A task tracking some experiments on the istat daemon and the statistics
> update code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira