PKP Bugzilla – Bug 6314
Optimize SELECT DISTINCT calls that include text-type DB columns
Last modified: 2012-12-14 13:43:58 PST
We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.
Optimize SELECT DISTINCT calls that include text-type DB columns.
Ideally, "SELECT DISTINCT" calls should be avoided unless they're necessary.
As a secondary measure, using SUBSTR on text-type columns limits the maximum length and will help to speed things up.
Created attachment 3401 [details]
Patch against OJS pre-2.3.4
Created attachment 3402 [details]
Patch against PKP pre-release
Leaving open pending testing and back-porting to other apps as needed.
After some consideration, I don't like this solution.
When we rewrite queries etc. for the sake of migrating to grids, SELECT DISTINCT should simply be avoided entirely.