Raw email tool

For users or potential users.
Post Reply
ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Raw email tool

Post by ForrestGumpDDS » Fri Nov 09, 2018 6:47 pm

I was running this tool today in a hope to deflate the emailmessage table.
Is this output normal?
Image

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Raw email tool

Post by cmcgehee » Sat Nov 10, 2018 9:10 am

My guess is that you have a lot of email messages that do not have a matching email address. If that's the case, this query would return a high number:
SELECT COUNT(*)
FROM emailmessage m
LEFT JOIN emailaddress a ON a.EmailUsername=m.RecipientAddress
WHERE a.EmailAddressNum IS NULL
Chris McGehee
Open Dental Software
http://www.opendental.com

ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Re: Raw email tool

Post by ForrestGumpDDS » Tue Nov 13, 2018 10:57 am

cmcgehee wrote:My guess is that you have a lot of email messages that do not have a matching email address. If that's the case, this query would return a high number:
SELECT COUNT(*)
FROM emailmessage m
LEFT JOIN emailaddress a ON a.EmailUsername=m.RecipientAddress
WHERE a.EmailAddressNum IS NULL
The number returned by the query is 16,132
It seems high.
Does that mean all those emails are not attached to the patient's charts. Like in case where the patient would list one or no email on the forms, and have a communication using another email address, thus OD does not know to whom this email conversation belongs?
I am trying to figure out what to do with those emails. The table emailmessage is huge. Maybe the solution on how to get raw email tool work on all of those messages will also give me a decent deflation of the emailmessage table?

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Raw email tool

Post by cmcgehee » Wed Nov 14, 2018 8:49 am

Those emails will still show up on the patients' charts. It's just that OD won't be able to link those emails to a row in the email address for the sender. From what I can think of, I don't think it will cause an noticeable problem. What is your motivation for deflating the email message table? Are queries related to emails running slowly?
Chris McGehee
Open Dental Software
http://www.opendental.com

ForrestGumpDDS
Posts: 177
Joined: Fri Oct 14, 2011 3:31 pm

Re: Raw email tool

Post by ForrestGumpDDS » Tue Nov 27, 2018 4:00 pm

Just the time that it takes the OD to update, well, maybe megabytes too, each backup is close to 0.5Gb (archived version).

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Raw email tool

Post by cmcgehee » Wed Nov 28, 2018 7:50 am

That makes sense. My guess is that the rest of the rows in your emailmessage table are emails that don't have anything in the RawEmailIn column. The raw email tool is only meant to clean up that column; it doesn't clear out the BodyText column because you would be losing communication data if it did.
Chris McGehee
Open Dental Software
http://www.opendental.com

Post Reply