You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a one-to-one table model, with a large number of rows in each (600k).
If I add an sqlalchemy relationship to the model, then I get horrendously slow performance of the view in FAB. This hapens regardless of whether I include any columns from the related model in the list etc.
I worked out this is because FAB is trying to collect the values of the entire table mentioned in the relation for the search field autopopulation. If I specify 'search_columns' in the view and exclude this releation it all works blazingly fast.
It's strange that the columns on the main view are not fetched in full, but those in relations are which makes me think this may be a bug. In any case it might be best to add this somewhere in the documentation as this caused me quite a lot of head scratching!
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It definitely would be useful to mention this 'large related tables' issue in the docs. It costed me a couple of days of digging into the FAB's and my own code to find why a simple list view took 12 seconds to load. Might be a good idea to completely exclude related fields from 'search_columns' by default.
I did not achieve to create a filterview and an extra search field to replace the huge option/form generated by defaults with relation objet when having a high nubmer of recorde
I have a one-to-one table model, with a large number of rows in each (600k).
If I add an sqlalchemy relationship to the model, then I get horrendously slow performance of the view in FAB. This hapens regardless of whether I include any columns from the related model in the list etc.
I worked out this is because FAB is trying to collect the values of the entire table mentioned in the relation for the search field autopopulation. If I specify 'search_columns' in the view and exclude this releation it all works blazingly fast.
It's strange that the columns on the main view are not fetched in full, but those in relations are which makes me think this may be a bug. In any case it might be best to add this somewhere in the documentation as this caused me quite a lot of head scratching!
The text was updated successfully, but these errors were encountered: