MySQL Forums
Forum List  »  Newbie

Re: Slow replies from the database
Posted by: Peter Brawley
Date: January 16, 2018 12:29AM

...FROM acad_usuarios ,acad_trans,acad_info_trans WHERE 1=1... is a cross join, so the resultset will include a row per every logically possible combination of rows in the three tables, for example if each table has just a thousand rows, the resultset will have a billion rows. It's to be hoped that's not what you had in mind.

Explicit join syntax, ie JOIN ON... | USING(...), is easier to write, debug, optimise and maintain. Try explicit join syntax and supply JOIN arguments.

Options: ReplyQuote


Subject
Written By
Posted
Re: Slow replies from the database
January 16, 2018 12:29AM


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.