Hello!
There was a problem, we have been using it for 9 years and the files were saved to the database, which led to freezing and braking.
I have now configured everything as needed and save the files to the directory.
But the database itself weighs a lot and there are a lot of files in the letters.
I looked at a lot of forum posts and didn't find a clear answer on how to delete files from the database and save the messages themselves.
A user on the forum wrote a script, but I'm not sure if it's working because he didn't get a response.
Thanks@AllanKikker
So the final set of queries to delete attachments would be as follows.
Query1 = SELECT 'id' as 'id2del' FROM 'ost_file' WHERE YOUR-WHERE-CONDITION;
{
QUERY2 = DELETE FROM 'ost_file_chunk' WHERE 'file_id' = 'id2del';
QUERY3 = DELETE FROM 'ost_file' WHERE 'id' = 'id2del';
QUERY4 = DELETE FROM 'ost_attachment' WHERE 'file_id' = 'id2del';
}
Before I go ahead and delete attachments from 100k odd emails, can someone confirm that the above queries are correct and all that we need?
Thanks
Please tell me in which tables old files are stored in large numbers to try to clear these tables