Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12478

There seems to be no way to check if collection has TTL index

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.9
    • Shell
    • None

    Description

      Is there any way to check collection index is set with TTL like expireAfterSeconds?

      The db.mycoll.stats() does not seem to tell that.

      > db.alliancej.ensureIndex(

      {created: 1}

      ,

      {expireAfterSeconds: 300}

      )
      > db.alliancej.stats()
      {
      "ns" : "map_cat.alliancej",
      "count" : 1,
      "size" : 96,
      "avgObjSize" : 96,
      "storageSize" : 8192,
      "numExtents" : 1,
      "nindexes" : 3,
      "lastExtentSize" : 8192,
      "paddingFactor" : 1,
      "systemFlags" : 0,
      "userFlags" : 1,
      "totalIndexSize" : 24528,
      "indexSizes" :

      { "_id_" : 8176, "uid_1" : 8176, "created_1" : 8176 }

      ,
      "ok" : 1
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            tikonen Teemu Ikonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: