Reputation: 87
I'm going to make a mysql database that is potentially going to hold thousands of records. before I create it I would like know what is the best way to approach this? I mean how can I make the database faster and when does a mysql databse start to slow down when fetching data. Are there any free solutions to this?
Thanks for reading :)
Upvotes: 0
Views: 1989
Reputation: 204756
Thousands of records is absolutely nothing for a DB.
Make proper indexes on the column you like to put conditions on in your queries. Example database table:
Persons
------------------------------
id int auto_increment
name varchar(200)
gender char(1)
Now imagine in the table are thousands of Person records. You want to select all data of a single person by the person's name.
The query would be
select * from persons
where name = 'John'
If you put an index on the name
column then the query will perform much faster.
Upvotes: 2