SY_File

Find general Jiwa support here.

SY_File

Postby robin » Fri May 16, 2014 11:02 am

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
robin
Occasional Contributor
Occasional Contributor
 
Posts: 26
Joined: Tue May 19, 2009 1:11 pm

Re: SY_File

Postby Mike.Sheen » Thu May 22, 2014 9:43 pm

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755


Return to Core Product Support

Who is online

Users browsing this forum: No registered users and 2 guests