I am designing a website that stores values in a MySql database. I need them to be able to be looked up by two numbers at the same time. I know how to use MySql queries to do what I need, but I am afraid that the database will grow quickly, and then start querying slowly. I heard about indexes, but after seaching on google, I haven't been able to figure out whether or not they are what I want, or how to use them.
Can someone explain to me what indexes are, how they work, and how to use them.
Basically yes. Indexes are a way for MySQL to quickly search through specific fields that you have chose as an index. Properly using indexes will greatly increase your query speeds, and you do not need to change your query syntax at all. For example, I have a database with over 500 Million entries, and with 99.9% Key Efficiency, it can process a few thousand queries a second still.
Keep in mind though if you have a large database having too many indexes can become inefficient as well (and consume a lot of space) as indexes are stored in a seperate file.