Open FalcoGer opened 3 years ago
If you can enable Referential Integrity for you DB environment, this may speed up deletion.
See $use_referential_integrity
in base_conf.php
.
MSSQL & PostgreSQL can support that by using the create_base_tbls_*_extra.sql
in the sql
directory.
See Issue #103 if you are running on Oracle.
I believe that MySQL is also now capable of using $use_referential_integrity in base_conf.php
file like PostgreSQL. Not real sure what needs to be done in order to bring BASE up to doing that for MySQL?
I've often considered this. Check out #103 . Apart form line ending characters and minor formatting, the scripts to add this to the DB server are the same. They are standard SQL commands. It may be possible to consolidate them. Would the unix line endings trip up a legacy version is MsSQL server, that is my only concern there.
I wouldn't be surprised if what we already have would just work on a MySQL that supported it. I wouldn't recommend it on "production" systems, however try it if you are feeling adventurous.
Next we would need to know the minimum version of the DB server software that supported this for each DB platform.
I'd have to add DB server version checks to ignore $use_referential_integrity
on installations where the DB server did not support it. Imagine the disaster that would ensue on the DB if BASE just blindly followed the config setting when the DB server did not support it.
And then there is Oracle, it's own unique snowflake that does everything a bit differently. I have no clue about how to set it up there. What we have "may" work, or it may not.
Opened #212 to track this conversation.
includes/base_action.inc.php
PurgeAlert()
Expected Behavior: Transactions are used to do deletes.
NG3-Note: On MySQL / MariaDB the ability to do this will be storage engine dependent. https://dev.mysql.com/doc/refman/8.0/en/storage-engines.html
Current Behavior: I have noticed that for instance deleting items will delete from several different tables, but it is not using transactions to do so:
This means that if the deletion is stopped midway through (for example because the user's browser was closed while waiting for half an hour to delete 18469x tcp data after reset), the database will be in an inconsistent state, having deleted some entries in some tables while leaving the others with a floating reference.