Skip to content
  • unarist's avatar
    a1c54220
    Optimize Status#permitted_for 500x (account timeline) (#5373) · a1c54220
    unarist a rédigé
    The main change of this PR is removing `order by visibility` hack.
    
    This was introduced to force using of `index_statuses_on_account_id` instead of PK index, but it seems no longer needed probably due to `index_statuses_on_account_id_id`. Removing this avoids reading all rows, so really improves first fetching of the user who has lot of statuses.
    
    I have also changed JOIN to IN + subquery, which slightly faster in most cases.
    a1c54220
    Optimize Status#permitted_for 500x (account timeline) (#5373)
    unarist a rédigé
    The main change of this PR is removing `order by visibility` hack.
    
    This was introduced to force using of `index_statuses_on_account_id` instead of PK index, but it seems no longer needed probably due to `index_statuses_on_account_id_id`. Removing this avoids reading all rows, so really improves first fetching of the user who has lot of statuses.
    
    I have also changed JOIN to IN + subquery, which slightly faster in most cases.
Chargement en cours