提交 6cf432c7 authored 作者: Thomas Mueller's avatar Thomas Mueller

The selectivity of LOB columns is no longer calculated because indexes on LOB…

The selectivity of LOB columns is no longer calculated because indexes on LOB columns are not supported.
上级 439b8981
......@@ -16,6 +16,7 @@ import org.h2.table.Column;
import org.h2.table.RegularTable;
import org.h2.table.Table;
import org.h2.util.StatementBuilder;
import org.h2.value.Value;
/**
* This class represents the statement
......@@ -82,7 +83,14 @@ public class Analyze extends DefineCommand {
Column[] columns = table.getColumns();
for (Column col : columns) {
buff.appendExceptFirst(", ");
buff.append("SELECTIVITY(").append(col.getSQL()).append(')');
int type = col.getType();
if (type == Value.BLOB || type == Value.CLOB) {
// can not index LOB columns, so calculating
// the selectivity is not required
buff.append("100");
} else {
buff.append("SELECTIVITY(").append(col.getSQL()).append(')');
}
}
buff.append(" FROM ").append(table.getSQL());
if (sample > 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论