Anonymous | Login | Signup for a new account | 2023-09-25 03:45 CDT | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Dependency Graph | [ View Issue ] [ Relation Graph ] [ Vertical ] | |||
|
||||
|
Viewing Issue Simple Details | |||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update |
0000975 | [In-Portal CMS] Optimization | task | N/A | 2011-01-25 04:44 | 2012-07-25 05:33 |
Reporter | alex | View Status | public | ||
Assigned To | alex | ||||
Priority | normal | Resolution | fixed | ||
Status | closed | ||||
Summary | 0000975: Automatically remove unused LEFT JOIN from list count database queries | ||||
Description |
That's not a rare case, when data from referenced table should be displayed along with data from table being viewed. To do that "LEFT JOIN" clause is added a SELECT query being used for data retrieval from database. That's not a bad habit actually. But, when table contains 1 million records and has 5 LEFT JOINs on it, then it really slows COUNT database query, used to calculate pagination for that grid. I propose that we dynamically remove "LEFT JOIN" parts of database query if JOINed table isn't used anywhere in that database query. For example this query doesn't use JOINed table at all, so we can remove it automatically: SELECT table1.* FROM table1 LEFT JOIN on table2 ON table1.field = table2.field WHERE table1.field = 'test'; |
||||
Additional Information |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic![]() In-Portal Open Source CMS |