PKP Bugzilla – Bug 6314
Optimize SELECT DISTINCT calls that include text-type DB columns
Last modified: 2012-12-14 13:43:58 PST
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.