MySQL Forums
Forum List  »  PHP

Re: what is the best way to disbaly nested queries
Posted by: John C. Clair
Date: February 07, 2017 03:57AM

Have a look at Common Table Expression.They should make that code more maintainable,and may possibly improve performance.It really depends,I had situations where I improved some queries by using sub queries.The factors that i am aware are:
*If sub query uses fields from outer query for comparison or not.
*If the relation between the outer query and sub query
*If there are no usable indexes on the joins.

Options: ReplyQuote


Subject
Written By
Posted
Re: what is the best way to disbaly nested queries
February 07, 2017 03:57AM


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.