Page 1 of 1

SY_File

PostPosted: Fri May 16, 2014 11:02 am
by robin
Hi Guys,

I have been doing some database maintenance as our database is now over 20gig, which seems very large......and is getting quite slow.
I have noticed the SY_File Table is 15gig out of the 20gig, on further investigation it would appear that every time we email a customer an invoice directly from Jiwa a binary copy of the PDF is being saved to SY_File.FileBinary.
Is there any reason/point of this?, and can I clear this table?
I have made a copy of my DB and tested and it doesn't appear to affect jiwa in any way, however I'm not willing to do the same thing to my live DB without some sort of conformation.

Cheers
Robin

Re: SY_File

PostPosted: Thu May 22, 2014 9:43 pm
by Mike.Sheen
robin wrote:Hi Guys,

I have been doing some database maintenance as our database is now over 20gig, which seems very large......and is getting quite slow.
I have noticed the SY_File Table is 15gig out of the 20gig, on further investigation it would appear that every time we email a customer an invoice directly from Jiwa a binary copy of the PDF is being saved to SY_File.FileBinary.
Is there any reason/point of this?, and can I clear this table?
I have made a copy of my DB and tested and it doesn't appear to affect jiwa in any way, however I'm not willing to do the same thing to my live DB without some sort of conformation.

Cheers
Robin


Hi Robin,

You can safely delete the entries relating to email attachments. When an email is sent via Jiwa, it creates an email record in various tables so you can view an audit of the emails sent by Jiwa - and this will include the attachments.

If you choose to delete entries from SY_File, I recommend you also delete the entries from the EM_Attachments table linking to this.

So, after you have deleted the SY_File entries, the following query will fix that up for you

Code: Select all
DELETE FROM EM_Attachments WHERE FileID NOT IN (SELECT FileID FROM SY_File)


Mike