โ† Zomato questions

Database query performance with index comparison

Filed under Zomato

The question

Given two databases A and B containing identical tables T (columns C1, C2), where C1 is the primary key in both, but C2 is additionally indexed in DB B. Which database executes 'SELECT C2 FROM T WHERE C1=X' faster, and which executes 'SELECT * FROM T WHERE C1=X AND C2=Y' faster?

No write-up yet. Related questions below have one.

Related Zomato questions

Collected from public candidate posts and coding forums. Updated Nov 2026.