[SERVER-2932] Create capped collections automatically at the first insertion Created: 12/Apr/11 Updated: 15/Feb/13 Resolved: 18/Sep/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Performance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Giorgio Merlini | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Win32 C++ (VS2008) |
||
| Participants: |
| Description |
|
Is it possible creating capped collections automatically at the first I receive some "packets" from a client. This data contains a name as |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 18/Sep/12 ] |
|
No way to do that, but you can convert later, and if its is small (i.e. check 1/1000 times) then converting will be very fast. |
| Comment by Giorgio Merlini [ 12/Apr/11 ] |
|
I agree. Unfortunately I haven't this information at startup and create capped collection before insertion means checking whether collection exists for each incoming data. In any case: thanks for your attention in this request |
| Comment by Scott Hernandez (Inactive) [ 12/Apr/11 ] |
|
If you know the name of the collection then you should create the capped collection before you insert data. By default collections are created non-capped since creating them as capped collections would require more information than is available during an insert/save. |