提交 8376df85 authored 作者: Thomas Mueller's avatar Thomas Mueller

Inserting LOBs got slower each time the process was restarted.

上级 635f5871
......@@ -20,7 +20,7 @@ import org.h2.util.MathUtils;
*/
public class FileObjectMemory implements FileObject {
private static final int CACHE_SIZE = 8;
private static final int BLOCK_SIZE_SHIFT = 16;
private static final int BLOCK_SIZE_SHIFT = 10;
private static final int BLOCK_SIZE = 1 << BLOCK_SIZE_SHIFT;
private static final int BLOCK_SIZE_MASK = BLOCK_SIZE - 1;
private static final CompressLZF LZF = new CompressLZF();
......
......@@ -85,7 +85,7 @@ public class TestLob extends TestBase {
stat.execute("set MAX_LENGTH_INPLACE_LOB 1");
PreparedStatement prep = conn.prepareCall("insert into test values('0000')");
// long start = System.currentTimeMillis();
for (int i = 0; i < 10000; i++) {
for (int i = 0; i < 2000; i++) {
// if (i % 1000 == 0) {
// long now = System.currentTimeMillis();
// System.out.println(i + " " + (now - start));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论