@query-doctor/core 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/optimizer/genalgo.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1281,11 +1281,15 @@ var _IndexOptimizer = class _IndexOptimizer {
|
|
|
1281
1281
|
findUsedIndexes(explain) {
|
|
1282
1282
|
const newIndexes = /* @__PURE__ */ new Set();
|
|
1283
1283
|
const existingIndexes = /* @__PURE__ */ new Set();
|
|
1284
|
+
const prefix = _IndexOptimizer.prefix;
|
|
1284
1285
|
function go(plan) {
|
|
1285
1286
|
const indexName = plan["Index Name"];
|
|
1286
1287
|
if (indexName) {
|
|
1287
|
-
if (indexName.startsWith(
|
|
1288
|
+
if (indexName.startsWith(prefix)) {
|
|
1288
1289
|
newIndexes.add(indexName);
|
|
1290
|
+
} else if (indexName.includes(prefix)) {
|
|
1291
|
+
const actualName = indexName.substring(indexName.indexOf(prefix));
|
|
1292
|
+
newIndexes.add(actualName);
|
|
1289
1293
|
} else {
|
|
1290
1294
|
existingIndexes.add(indexName);
|
|
1291
1295
|
}
|