Open marshluca opened 8 months ago
This seems reasonable to me. Should add some documentation for it though.
This seems reasonable to me. Should add some documentation for it though.
@excid3 Thanks for the response! I've updated the documentation, please let me know if I missed anything.
@excid3 I have made some updates, any feedback is welcome :)
This seems reasonable to me. Should add some documentation for it though.
Any feedback on this PR? @excid3
we have a model using global records feature in
acts_as_tenant
gemWith a given tenant scope
1
, It generates SQL like below:as the data increased, it spent about 2s, but after we changed the global records identifier to a number
3
, the query time decreased to 70ms.It looks like MySQL doesn't perform well on
NULL
values index. So I proposed this pull request to make the global records identifier configurable.It doesn't change the default behaviour, hope it is acceptable. Any feedback is welcome. Thanks.