Scenario: A large e-commerce website stores millions of product records in its database. Customers frequently search for products based on categories, brands, and price ranges. How would you design indexes to optimize search performance for this scenario?
- Avoid indexing for better insert performance
- Create composite indexes on category, brand, and price columns
- Implement a full-text search index for keyword searches
- Use a single index on the product ID column
In this scenario, creating composite indexes on the frequently searched columns like category, brand, and price would optimize search performance. Composite indexes cover multiple columns and are efficient for queries involving those columns.
Loading...
Related Quiz
- A financial institution needs to summarize transaction data by month to generate monthly reports. How would you implement this aggregation in a database?
- What is the primary difference between document-based NoSQL databases and key-value stores?
- Scenario: A large e-commerce platform is experiencing rapid growth in its customer base. As a database administrator, how would you utilize partitioning to handle the increasing data volume?
- What is the purpose of branching in version control systems for data modeling?
- Which database design tool is more suitable for large-scale enterprise projects, MySQL Workbench or Microsoft Visio?