ObjectId 를 생성된 시간의 timestamp 로 이용하기

154 views
Skip to first unread message

Min

unread,
Feb 6, 2012, 8:02:02 PM2/6/12
to mongo...@googlegroups.com
http://blog.fiesta.cc/post/16470048697/using-and-abusing-mongodb-objectids-as-created-on

mongodb 의 기본 pk (?) 필드인 _id (ObjectId) 는 생성된 시간정보가 bit 에 포함되어 있습니다.
따라서 create_time 같은 추가적인 필드를 만들고 또 인덱스를 걸지 않아도 _id 를 이용해 검색하거나 조회를 할 수 있습니다.~

Reply all
Reply to author
Forward
0 new messages