MySQL Forums
Forum List  »  PHP

Re: Query is 0.0009 seks, but screen takes 5-10 seks
Posted by: Jonathan Stephens
Date: September 05, 2014 09:50PM

If the query is executing in .0009 s, then it's executing in .0009 s, and your problem is likely not with MySQL, but with your queries and/or application.

The .0009 s is the time MySQL takes to process the query and return a result--this does not include the time needed by PHP for processing the result set or by the webserver to push the end product to your page, as MySQL has no way of knowing about these things.

I'd try following the earlier suggestion to paginate using a WHERE or LIMIT clause.

I'll offer a further suggestion that SELECT * is bad, bad, bad. Especially when doing joins. You should never do this unless you really need every column from the result. Selecting columns that you're not using for anything just wastes resources--select only the columns your app actually requires.

Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation
Oracle

Options: ReplyQuote


Subject
Written By
Posted
Re: Query is 0.0009 seks, but screen takes 5-10 seks
September 05, 2014 09:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.