Opened 13 years ago
Closed 12 years ago
#18840 closed enhancement (duplicate)
get_pages query optimization for inclusions/exclusions
Reported by: | 5ubliminal | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3 |
Component: | Performance | Keywords: | has-patch 3.4-early |
Focuses: | Cc: |
Description
Turned ID <> 1, ID <> 2, ... into ID IN (1, 2, ...).
Removed some redundant ->prepare as the IDs are already int-cast, hence improved performance.
Concatenation is done once also, not once for each excluded ID.
Shortened the query a lot and gained 20% in speed compared to old method (on about 25 excluded pages from about 40).
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Looks good. We probably have a few other areas in core that results in similar SQL construction as well.