DB index for deleted
See original GitHub issueWould you welcome a PR to change SafeDeleteModel.deleted
into something like this?
deleted = models.DateTimeField(editable=False, null=True, db_index=SAFE_DELETED_DB_INDEX)
where SAFE_DELETED_DB_INDEX
will be optionally configurable via django settings (default to False
for backwards compatibility).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Delete an Index - SQL Server | Microsoft Learn
To delete an index by using Object Explorer · In Object Explorer, expand the database that contains the table on which you want...
Read more >More indexes, slower DELETE - Use The Index, Luke
The more indexes you add to a table, the slower DELETE becomes. Exception: PostgreSQL due to its MVCC approach.
Read more >Indexing for Deletes - Brent Ozar Unlimited®
If you're only indexing to make reads faster, you need to think again. Indexes can make every operation in the database faster, even...
Read more >SQL DROP INDEX - W3Schools
The DROP INDEX command is used to delete an index in a table. MS Access: DROP INDEX index_name ON table_name;. SQL Server:.
Read more >How to safely remove database indexes (without bringing ...
Safely remove database indexes by disabling them. This improves application perforamnce. Works for MySQL, MariaDB, PostgreSQL, Microsoft SQL ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nice work, and I think the default index is useful.
For a table with about 20K lines, just a simple query will cause about 5s, which is not acceptable, and 20K is not a large dataset.
As a user, I want to install the lib and do no harm to our previous work, however, the performance does harm the work, and I have to dive into the source code to find the index. I think making it default is more intuitional.
Anyway, thanks for your work, nice lib!
Yes, but it was still ‘deleted’ for the index and the one defined in the setting for the field name in the tests. I’m not sure why.