Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Order
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Mar 2015 at 12:05 UTC
Updated:
12 Nov 2021 at 13:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dwkitchen commentedPatch attached to add 4 index based on those on the node table.
Comment #2
rszrama commentedI think we want to add indexes lightly... I seem to recall creating issues for sites in the past with large numbers of entities when we added an index. I think we need to do a bit of review that gives us an idea for how expensive this operation is, because it may need to be an opt-in for existing sites instead of an automatic update.
Comment #3
joelpittetMaybe this would be easier to get in with some profiling results before and after on each of the index in a common scenario for each?
Likely a good idea to be selective about which fields to index. Order type looks particularity case specific.
Comment #4
favrik commented+1
Recently, I needed to pull some orders for sending abandoned cart emails, and wanted to check the `created` column, which does not have an index.
Comment #5
chris matthews commentedThe 4 year old patch to commerce_order.install does not apply to the latest commerce 7.x-1.x-dev and needs a reroll.
Comment #6
khiminrm commentedComment #7
khiminrm commentedComment #8
khiminrm commentedfixed names
Comment #9
khiminrm commentedComment #10
kapilv commentedComment #11
danmer commentedTested. Patch from comment #8 works as expected.
Comment #12
rszrama commentedThanks! Rerolled this to increment the update hook number to 7113 and add a settings based override to disable adding the indexes via the update function. With millions of rows, this could be quite a costly update. 😬
Committed!