Your team is developing a web application where users frequently search for articles based on keywords. How would you implement index-based search to improve query performance?

  • Create separate indexes for each keyword
  • Implement bitmap indexes
  • Use inverted indexes for keywords
  • Utilize clustering indexes
Using inverted indexes for keywords involves mapping each keyword to the articles that contain it, enabling efficient keyword-based searches. Creating separate indexes for each keyword may lead to index bloat and inefficiency. Clustering indexes organize related data physically to reduce disk I/O, which is not directly related to keyword-based searches. Bitmap indexes are more suitable for low-cardinality data like flags or categories. Therefore, implementing inverted indexes is the optimal approach for improving query performance in keyword-based searches.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *