INNER CODE UNIT · TypeScript

byName

bytebase/dbhub · src/connectors/oracle/index.ts:594

      const byName = Object.fromEntries(stats.map((row) => [row.NAME, Number(row.VALUE)]));
      // Logical reads = current-mode gets + consistent-mode gets; physical
      // reads are the subset that had to go to disk.
      const logicalReads = (byName["db block gets"] ?? 0) + (byName["consistent gets"] ?? 0);
      const physicalReads = byName["physical reads"] ?? 0;

      result.bufferCache = {
        hitRatioPct: computeHitRatioPct(logicalReads, physicalReads),
        blocksHit: logicalReads - physicalReads,
        blocksRead: physicalReads,
      };
    } catch {
      notes.push(
        "Buffer cache metrics unavailable: connecting user lacks SELECT on V$SYSSTAT (grant SELECT_CATALOG_ROLE or SELECT ANY DICTIONARY)."
      );
    }

    if (notes.length > 0) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…