InterviewSolution
Saved Bookmarks
| 1. |
Oracle provides the EXPLAIN PLAN and PostgreSQL provides EXPLAIN ANALYZE, both of these help to understand the query plan chosen by the database, what is the equivalent of this in MongoDB? |
|
Answer» When any text content WITHIN a document needs to be searchable, all the string fields of the document can be indexed USING the $** wildcard specifier. db.articles.createIndex( { "$**" : "text" } ) Note: Any new string field ADDED to the document after creating the index will automatically be indexed. When data is huge, wildcard INDEXES will have an impact on performance and hence should be used with due CONSIDERATION of this. |
|