When should I call ensureIndex? Before inserting a single record, after inserting a single record, or before calling find()?
Regards,
Johnny
I'd recommend calling ensureIndex once, when your application starts.