Skip to content

Commit 46c9f3b

Browse files
committed
结果集容量预估:LIMIT 10^9 = 1 亿 以内无任何条件时 最多扩容 1 次
1 parent f63e2ad commit 46c9f3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractSQLExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public M execute(@NotNull SQLConfig<T, M, L> config, boolean unknownType) throws
356356
Map<String, Object> having = config.getHaving();
357357
int havingCount = having == null ? 0 : having.size();
358358

359-
double cap = capacity / Math.pow(1.5, Math.log10(capacity)
359+
double cap = capacity / Math.pow(1.5, Math.log10(capacity)/8 // LIMIT 10^9 = 1 亿 以内无任何条件时 最多扩容 1 次
360360
+ andCondCount
361361
+ ((orCondCount <= 0 ? 0 : 2.0d/orCondCount) // 1: 2.3, 2: 1.5, 3: 1.3, 4: 1.23, 5: 1.18
362362
+ (notCondCount/5.0d) // 1: 1.08, 2: 1.18, 3: 1.28, 4: 1.38, 1.50

0 commit comments

Comments
 (0)