Closed swrobel closed 2 years ago
Hey @swrobel, thanks for the contribution! I'll merge this shortly and we'll bundle this up with other changes before issuing a release.
In the meantime, would you mind sharing a bit of your use case for this?
The migration doesn't include an index for the amount on the lines table, did you add an index on your app? Or is it querying against a subset of records?
I'm always using it against a subset of records, so I didn't think adding another index would be useful, but I suppose maybe there are some cases for others where it could be?
Fair enough! Thanks for sharing.
I guess the best approach is leaving the index out for now. Anyone with performance issues using those scopes can add the index to their app. In our experience the lines table can get pretty big so it's best to avoid non essential indexes.
I've overridden locally in the past & found these scopes useful, so I thought they might be a welcome addition to 2.0