Select count (distinct the testcases. Full_name)
The from jobs
Left the join perform on perform.com pare said=1
And perform. Performvalue & lt;> '
And perform. Gvalue & lt;> '
And jobs. Id=perform. Job_id
Left the join the testcases on perform. Testcase_id=the testcases. Id
Left the join testplans on perform. Testplan_id=testplans. Id
Left the join perform_items on perform. Performitems_id=perform_items. Id
Where
Date_format (jobs) testdate, 'Y - m - % d % %)=' 2019-12-31 '
Now perform month according to the table, each table data about five million
This how to rewrite the SQL to query all perform the SQL table, the great god, please give directions,
CodePudding user response:
Or split the SQL statement above, the table of each month with the above SQL execution again, then code layer aggregation query results, is that ok?PS, perform after table, data useful within a year, up to twelve tables,
CodePudding user response:
With the view, the union all tablesCodePudding user response: