API 参考
    正在准备搜索索引...
    interface CollStats {
        avgObjSize: number;
        capped: boolean;
        count: number;
        freeStorageSize?: number;
        indexBuilds?: number;
        indexDetails?: any;
        indexSizes: { _id_: number; [index: string]: number };
        lastExtentSize: number;
        max: number;
        maxSize: number;
        nindexes: number;
        ns: string;
        numExtents: number;
        ok: number;
        paddingFactor: number;
        scaleFactor: number;
        size: number;
        storageSize: number;
        totalIndexSize: number;
        totalSize: number;
        userFlags?: number;
        wiredTiger?: WiredTigerData;
        [key: string]: any;
    }

    层级 (查看层级一览)

    可索引

    • [key: string]: any
    索引

    属性

    avgObjSize: number

    Average object size in bytes

    capped: boolean

    true if the collection is capped

    count: number

    Number of documents

    freeStorageSize?: number

    The amount of storage available for reuse. The scale argument affects this value.

    indexBuilds?: number

    An array that contains the names of the indexes that are currently being built on the collection

    indexDetails?: any

    The fields in this document are the names of the indexes, while the values themselves are documents that contain statistics for the index provided by the storage engine

    indexSizes: { _id_: number; [index: string]: number }

    Size of specific indexes in bytes

    lastExtentSize: number

    Size of the most recently created extent in bytes

    max: number

    The maximum number of documents that may be present in a capped collection

    maxSize: number

    The maximum size of a capped collection

    nindexes: number

    Number of indexes

    ns: string

    Namespace

    numExtents: number

    Number of extents (contiguously allocated chunks of datafile space)

    ok: number
    paddingFactor: number

    Padding can speed up updates if documents grow

    scaleFactor: number

    The scale value used by the command.

    size: number

    Collection size in bytes

    storageSize: number

    (Pre)allocated space for the collection in bytes

    totalIndexSize: number

    Total index size in bytes

    totalSize: number

    The sum of the storageSize and totalIndexSize. The scale argument affects this value

    userFlags?: number

    A number that indicates the user-set flags on the collection. userFlags only appears when using the mmapv1 storage engine

    wiredTiger?: WiredTigerData

    This document contains data reported directly by the WiredTiger engine and other data for internal diagnostic use