Reputation: 328
I'm using a table to do login, the table has a record of 2500. when i try to login it takes nearly 30-40 seconds to load. I'm using PHP and MySQL.I need to make the sql query faster to check the data. Solutions are welcomed thanks in advance pls help me out
Upvotes: 2
Views: 268
Reputation: 26376
You should have included your query so we can examine it. Don't pull all your records (e.g. don't use Select * from users) and then loop through to find a match. Instead, use WHERE clause to limit your records to (i.e. one row). That is
SELECT col1,col2,.. FROM Users WHERE username='username' AND password='password'
You can try that and see the performance...
Upvotes: 0
Reputation: 26
When locating the causes of problems of performance issues, there are many things to consider in the your application stack:
Upvotes: 1