Well, you shouldn't be querying. This should be cached. Think about it like this. Let's say there are 28,000 tags on SO. Let's say each tag is 128 bytes (it's not). That's just 3,584,000 bytes (basically nothing). There are many in-memory data structures that can make it very fast to search through such data.
↧
Answer by BobbyShaftoe for Effcient method for ajax autocomplete query on big db table and busy site
↧