Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
node.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Aug 2010 at 22:19 UTC
Updated:
12 Apr 2011 at 20:22 UTC
Well not exactly, merely move the distinct to a sub query. A DISTINCT clause means the database server has to iterate over the returned result set and insure a single column has no to exact same values. That becomes a large task when the result set is large. However, if we added the DISTINCT clause as a subquery to the table that produces the duplicate entries (node_access), then the DISTINCT filter would filter over the least amount of results needed to produce a unique result set.
Alternately, the sub-query DISTINCT could become a "COUNT(*), nid" and GROUP BY nid which will also produce unique nid records.Though since grant_(op) is a required field, this is a less desirable tactic.
| Comment | File | Size | Author |
|---|---|---|---|
| remove-distinct.patch | 2.22 KB | josh waihi |
Comments
Comment #2
sun.core commentedI don't see the case for the major priority here. Rather a performance patch?
Comment #3
azol commentedremove-distinct.patch queued for re-testing.
Comment #5
amateescu commentedDuplicate of #681760: Try to improve performance and eliminate duplicates caused by node_access table joins.