Topic: Database "Ran out of Memory."

*** My Database ran out of memory ***

Intentions: I created the database to store all my graphic designs with large files. The average file is around 10MB.

Noticed: That my "save  image in database"  and "save file in database" elements were set to: Type: StoreFile


Changes:  I made changes to both database file and image properties to save files in /image/ folder that I created.
Properties were also set to:     type: LinkFiles.


Problem: The database is still really slow loading possibly due to the stored files in the database.

Is there a solution to this problem? Without deleting all my graphic design files?

Thank you,
Heriberto

Post's attachments

Attachment icon ProjectDatabase.jpg 65.41 kb, 291 downloads since 2017-04-14 

Re: Database "Ran out of Memory."

Hello.


This is bad idea to store large files in a database.


Now you should save all stored files from the database then delete them from database. After that you can make procedure VACUUM.


like this

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
   SQLExecute('VACUUM');
end;

Finally you can save all file again, using method LinkFile.



If you have a lot of files, you can write a script, using procedure SaveFileFromDataBase to save files from database, then save them back using SQL query (UPDATE TABLE)

Dmitry.

Re: Database "Ran out of Memory."

Dmitry,

I completely overlooked the settings in "files in database".
Noticed when database was loading really slow...  :-)

I will add the module stated above.

Thank,
Heriberto