Optimize SuiteCRM

Hello everyone!

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:

Two kinds of orphaned records may exist:

  1. Custom fields of deleted records
  2. Relationships to deleted records

Thanks pgr!

Looking at

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!

You can delete all orphaned _cstm records for all tables…

About the relationships, it’s two different things:

  1. Deleting entries in relationship tables that have deleted=1
  2. Deleting entries in relationship tables that are pointing to records in other tables that don’t exist anymore

Both are covered in this section.

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 :wink:

Great!

Small O.T. if you allow me:

I need to set “Email Settings for notifications”, “Inbound Email for Bounce Handling” and “Outbound Email for sending campaigns”.

It is not clear to me if it is right to use the same mailbox or create separate emails.

For example Email Settings, create a dedicated box like crm@mydomain.com and as “From Address:” set noreply@mydomain.com?

For Inbound Email and Outbound Email, use another box such as info@mydomain.com.

Or use info@mydomain.com everywhere?

What advice can you give me?

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…

I will open a discussion, but I wanted to tell you, I shouldn’t have technical problems with configuration, etc. so feel free to tell your opinion.

I simply speak logically as you would set up, whether all with the same email or differently.

My hesitation is not for thinking that you wouldn’t understand my instructions, it’s for not being sure that my instructions would work… :frowning: