advancedDatabase452 of 469
Index on (status, created_at) and the query filters only on created_at. Does the index help?
Tests whether you know a composite index is only usable left-to-right -- filtering on created_at alone, without status, generally can't use this index efficiently (it would need a full scan or a separate index on created_at), because the leading column must be part of the filter.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a responseNext Step
←PreviousContinue to Two transactions read one row, both update it, and one update vanishes (or two threads update the same record). What prevents it?→
← Back to all Spring Boot & Microservices questions