MySQL Forums
Forum List  »  Newbie

Re: optimalize ugly view
Posted by: Peter Brawley
Date: May 25, 2020 09:52AM

The ugliness reflects underlying table design issues?

What is the MySQL version? What storage engine do these tables use?

MySQL Views do not optimise well, neither do correlated subqueries in Select expressions, neither do Left Joins.

Why Left rather than Inner Joins in the 2nd query, you want to see the Nulls?

Grouping across joins is fraught. If these queries use Group By to suppress duplicate result rows, use Select Distinct instead.

Are st1...10 ten instances of one table definition? If so, why not have one big table with an `st` column?

If we're to help, we'll need to see Show Create Table results for these tables, and an explicit statement of the query requirement in plain English.

Options: ReplyQuote


Subject
Written By
Posted
May 25, 2020 08:37AM
May 25, 2020 08:38AM
Re: optimalize ugly view
May 25, 2020 09:52AM
May 25, 2020 11:00AM


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.