uralbash / sqlalchemy_mptt

SQLAlchemy nested sets mixin (MPTT)
http://sqlalchemy-mptt.readthedocs.io
MIT License
196 stars 32 forks source link

Add index to foreign key (parent_id) column for optimized record retrieval & deletion #84

Open akhil018 opened 10 months ago

akhil018 commented 10 months ago

The problem was identified in the foreign key(parent_id) column, where retrieval and deletion of records took an unexpectedly long time. To optimize the retrieval and deletion process, this fix introduces a new index on the relevant foreign key (parent_id) column.

This commit addresses performance issues related to both record deletion and retrieval in the sqlalchemy_mptt library. Adding an index to the foreign key(parent_id) column improves the efficiency of both operations, significantly reducing the time taken for deletion and retrieval.