I wanted to know, to optimize the SuiteCRM database (Version 7.11.15), do you do any particular operation or leave everything to SuiteCRM and its periodic Schedulers, activating in particular also “Prune Database on 1st of Month”?
Another thing, using the Import function, I find the files in /upload
IMPORT_Account_1
IMPORT_Contact_1
I also find the “import” folder with the files
dupes_1.csv
dupesdisplay_1.csv
error_1.csv
errorrecords_1.csv
errorrecordsonly_1.csv
status_1.csv
Are these files to be kept because they are needed by the system, or can they be deleted?
All this because I like to keep both the database and the files clean.
I think that the left-overs from the Imports are not needed; just back them up to some other place and then delete them after a while, when you are sure they’re not required.
I wrote some tips about checking for more orphaned records here:
SELECT * -- DELETE ChildTable
FROM contacts_cstm ChildTable
LEFT JOIN contacts ParentTable
ON ChildTable.id_c = ParentTable.id
WHERE ParentTable.id IS NULL
I think is good to do the same also for accounts_cstm, do you?
SELECT * -- DELETE ChildTable
FROM accounts_cstm ChildTable
LEFT JOIN accounts ParentTable
ON ChildTable.id_c = ParentTable.id
WHERE ParentTable.id IS NULL
I have seen that something remains inside accounts_audit, accounts_contacts and contacts_audit too? Should I look at some other tables? I see also users_last_import.
About relationship, I did not understand well, perhaps deleting “deleted 1”?
It is really a pity that one that such a powerful script does not manage the cancellation correctly and we have to put ourselves to work by hand on the database!
Note that on that article I put everything as SELECTs but the whole point is to make DELETE’s. I just didn’t want the responsibility if anybody mistakenly nuked their databases
To be honest I’ve stopped giving advice about email issues some time ago, I am working to fix many things email-related in SuiteCRM to bring the email features into a more sane territory… currently it’s a mess to help out people on the Forums, accompanying them through the entire email set up of the CRM.
It’s something that you just need to do with a lot of trial and error, experimentation, working around faults, etc. I do encourage you to open threads with questions though, it’s just that I won’t likely be answering…