From e5d6642e4e6c08db2e5f1035a441465918f1c298 Mon Sep 17 00:00:00 2001 From: Louis Chatriot Date: Sat, 1 Jun 2013 22:49:08 +0200 Subject: [PATCH] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f656f1..f1d8922 100644 --- a/README.md +++ b/README.md @@ -301,11 +301,14 @@ d.insert({ name: 'nedb' }, function (err) { d.insert({ name: 'nedb' }, function (err) { // err is { errorType: 'uniqueViolated' // , key: 'name' - // , message: 'Unique constraint violated for key nedb' } + // , message: 'Unique constraint violated for key name' } }); }); ``` +**Note: ** the ensureIndex creates the index synchronously, so it's best to use it at application startup. It's quite fast so it doesn't increase startup time much. + + ## Performance ### Speed