View Index Optimization
When optimizing view indexing performance, which practice helps minimize unnecessary recomputation when documents are frequently updated?
- A) Designing map functions that only emit necessary fields
- B) Including random values in emitted keys
- C) Creating deeply nested reduce functions
- D) Rebuilding all views after each update
- E) Storing indexes in external storage
Bulk Document Inserts
Given a use case where thousands of new sensor readings are collected per minute, which strategy most effectively improves write throughput?
- A) Inserting one document at a time sequentially
- B) Running compaction before every insert
- C) Using the bulk document API to insert batches
- D) Querying the design document on each write
- E) Disabling write-ahead logging
Resource Bottlenecks
During peak load, a database instance experiences slow view queries and high disk I/O; which tuning adjustment most directly addresses this bottleneck?
- A) Reducing maximum database connections
- B) Allocating more memory for the OS file cache
- C) Increasing the polling interval for continuous replications
- D) Lowering the number of shards per database
- E) Decreasing the revision pruning frequency
Conflict Resolution Impact
How can frequent document update conflicts negatively impact overall replication and query performance?
- A) By preventing document deletion
- B) By increasing the size of view indexes with conflicting revisions
- C) By causing non-deterministic primary key assignment
- D) By disabling paging in query responses
- E) By eliminating the need for staging environments
Compaction Timing
If compaction is never triggered on a heavily updated database, what negative performance consequence will most likely result over time?
- A) Frequent cache invalidation
- B) Growing disk usage and slower read operations
- C) Immediate system crash after every write
- D) Disabling all indexes automatically
- E) Skipping write-ahead logs
Sharding and Node Load
A database cluster is configured with too few shards per database; which performance issue is most likely to occur as document count grows?
- A) Underutilization of disk space
- B) Excessive memory thrashing on clients
- C) Imbalanced distribution of documents causing hot spots
- D) Increased number of open databases per node
- E) Decreased reliability of compaction
Reduce Function Efficiency
Why should reduce functions in view queries always be associative and idempotent, especially when handling large datasets?
- A) To ensure they pass syntax validation
- B) To allow parallel aggregation across view index trees
- C) To decrease the storage required for each document
- D) To avoid needing a design document per query
- E) To prevent random document order during query execution
Index Staleness Trade-offs
When using a 'stale' query option for views, what is the primary benefit and trade-off regarding performance?
- A) Updates are more frequent, but queries become random
- B) Query results are faster, but may not reflect the latest data
- C) View indexes are deleted, but writes become more reliable
- D) Cache sizes increase, but index maintenance costs decrease
- E) Each query triggers immediate automatic compaction
Attachment Storage Impact
A photo-sharing application stores large image files as attachments in documents, causing sluggish document retrieval; which performance mitigation is recommended?
- A) Store only paths to images as document fields, keeping binary data elsewhere
- B) Compress all attachments using non-standard codecs
- C) Encode image files as JSON strings
- D) Insert attachments before the document body is created
- E) Use map-reduce queries to fetch raw binary attachments
Querying Views vs. All Documents
When retrieving all user profiles by email domain on a regular basis, which approach is more scalable for performance?
- A) Iterating through all documents using a full database scan
- B) Using a view with a map function emitting the email domain as the key
- C) Fetching each user document individually by ID
- D) Querying attachment metadata on every request
- E) Extracting domains via continuous replication