Re: optimalize ugly view
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.
Subject
Written By
Posted
Re: optimalize ugly view
May 25, 2020 09:52AM
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.