How to store and retrieve many-to-one records in a table of "messages" given a "server".

The "messages" and "server" are just analogies of the situation. Suppose we have a "servers" table and "messages" table where each server has certain messages in the messages table. How would I be able to efficiently store each server's messages in a way that would make it easier and faster to retrieve it in the future instead of having to go through the whole table (which would be done if I used "where") in order to retrieve the necessary messages?
1 Reply
Neto
Neto•16mo ago
Indexing
Want results from more Discord servers?
Add your server