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

Database's size upon collection removing

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.0.2
    • Performance
    • None
    • OS X
    • Hide

      1. Create collection

      use students;
      db.grades.drop();
      for (i = 0; i < 10000000; i++) {
      for (j = 0; j < 4; j++) {
      assess = ['exam', 'quiz', 'homework', 'homework'];
      record =

      {'student_id':i, 'type':assess[j], 'score':Math.random()*100}

      ;
      db.grades.insert(record);
      }
      }

      2. Drop collection grades
      3. show dbs command will show you that size of database was not changed
      4. Removed collection is still on hard disk drive and takes place.

      Show
      1. Create collection use students; db.grades.drop(); for (i = 0; i < 10000000; i++) { for (j = 0; j < 4; j++) { assess = ['exam', 'quiz', 'homework', 'homework'] ; record = {'student_id':i, 'type':assess[j], 'score':Math.random()*100} ; db.grades.insert(record); } } 2. Drop collection grades 3. show dbs command will show you that size of database was not changed 4. Removed collection is still on hard disk drive and takes place.

    Description

      Database size does not change upon collection's removal.
      It also occupies hard disk.
      Only database drop can free hard disk space.

      Attachments

        Activity

          People

            Unassigned Unassigned
            miholeus miholeus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: