what is idhack

2,938 views
Skip to first unread message

Sameer Akhtar

unread,
Oct 11, 2011, 11:19:03 AM10/11/11
to mongodb-user
Hi All,
I am getting the following result on running the profiler. Can anyone
please let me know that what does 'idhack' mean.

> db.system.profile.find({millis:{$gt:5}})

{ "ts" : ISODate("2011-10-11T14:07:27.361Z"), "info" : "query collider-
server.partners ntoreturn:1 idhack reslen:168 165ms", "millis" :
165 }
{ "ts" : ISODate("2011-10-11T14:07:27.361Z"), "info" : "query collider-
server.partners ntoreturn:1 idhack reslen:168 144ms", "millis" :
144 }
{ "ts" : ISODate("2011-10-11T14:07:27.361Z"), "info" : "query
xyz.partners ntoreturn:1 idhack reslen:168 140ms", "millis" : 140 }
{ "ts" : ISODate("2011-10-11T14:07:27.361Z"), "info" : "query xyz-
server.partners ntoreturn:1 idhack reslen:168 93ms", "millis" : 93 }
{ "ts" : ISODate("2011-10-11T14:07:27.361Z"), "info" : "query xyz-
server.partners ntoreturn:1 idhack reslen:168 62ms", "millis" : 62 }
{ "ts" : ISODate("2011-10-11T14:07:27.361Z"), "info" : "query xyz-
server.partners ntoreturn:1 idhack reslen:168 157ms", "millis" :
157 }
{

Scott Hernandez

unread,
Oct 11, 2011, 11:37:39 AM10/11/11
to mongod...@googlegroups.com
It just means that the _id index is used and the normal check against
possible indexes is skipped for the special case of a query on the _id
field. It is harmless, and just informational.

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Karl Seguin

unread,
Oct 11, 2011, 11:46:37 AM10/11/11
to mongod...@googlegroups.com
You mean it short circuits figuring out which query plan will be best, since obvious the index on _id will be?

I've seen that message too...low priority, but I'd say a different message in the log might be better...like "quickId"  or "queryById"

"hack" makes me think you committed something drunk on new years eve.

Scott Hernandez

unread,
Oct 11, 2011, 11:56:37 AM10/11/11
to mongod...@googlegroups.com
Yes, it does a fast index selection for the _id index.

Feel free to add a jira issue with that comment :)

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/mongodb-user/-/bc98r6ah3O4J.

Reply all
Reply to author
Forward
0 new messages