@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 CHANGED
@@ -1331,11 +1331,15 @@ var _IndexOptimizer = class _IndexOptimizer {
1331
1331
  findUsedIndexes(explain) {
1332
1332
  const newIndexes = /* @__PURE__ */ new Set();
1333
1333
  const existingIndexes = /* @__PURE__ */ new Set();
1334
+ const prefix = _IndexOptimizer.prefix;
1334
1335
  function go(plan) {
1335
1336
  const indexName = plan["Index Name"];
1336
1337
  if (indexName) {
1337
- if (indexName.startsWith(_IndexOptimizer.prefix)) {
1338
+ if (indexName.startsWith(prefix)) {
1338
1339
  newIndexes.add(indexName);
1340
+ } else if (indexName.includes(prefix)) {
1341
+ const actualName = indexName.substring(indexName.indexOf(prefix));
1342
+ newIndexes.add(actualName);
1339
1343
  } else {
1340
1344
  existingIndexes.add(indexName);
1341
1345
  }