Execution time of a mysql query, slow in php than phpmyadmin . How I can overcome this -
I was running a query in phpmyadmin, it takes approximately 0.0012 seconds to execute.
may be due to the default limit in phpmyadmin but it is the total of the line The number is counted.
But in php, I need the total number of lines. I was running the query without any limitation that takes 6-8 seconds to execute the query. / P>
They have any way to solve this problem.
I have such a problem and in my case this was due to the fact that I Was not using So, as long as I wanted to query the index field with my varChar
type varichar, I have incorrectly prepared the query in such a way that I have interrogated it and with the int parameter. As a result the index is not being used, but a full table is being scanned. For example I did:
SELECT * from table WHERE Indexfield = 015523;
When I was supposed to do the following:
SELECT * from table WHERE Indexfield = '015523';
Here's some other insight on this issue:
Comments
Post a Comment