Inhalte aufrufen

Profilbild

How to decrease database size?

database size decrease

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
3 Antworten zu diesem Thema

#1 SalehBagheri

SalehBagheri

    Advanced Member

  • Members
  • 31 Beiträge

Geschrieben: 20 April 2020 - 22:35

Hallo,

 

Our store database reached 1GB, and the hosting provider doesn't allow the size of the database to be more than 1GB.

 

Now, I can't add new data such as product or category to the database.

 

How to decrease database size? or remove which items?

 

There are about 1800 removed products. but I think their pictures data still exist in "Picture" table. How to remove them?



#2 Wolfgang Schmerge

Wolfgang Schmerge

    SmartStore AG

  • Administrators
  • 2162 Beiträge

Geschrieben: 21 April 2020 - 13:50

Hi,

 

where are the media stored to date according to the shop settings?
Configuration -> Settings -> Media Settings
 
Has the task "delete logs" already been executed?
System -> Scheduled Tasks
 
Under system -> system information you can also shrink the database.
 
Regards
 
Wolfgang

Bleibt gesund!

 

Viele zusätzliche Smartstore Plugins gibt es im MARKETPLACE:
http://community.sma...dex.php?/files/

 

Hier geht es zu den Smartstore Videos:
Smartstore.NET Youtube-Channel
 

Die deutsche Smartstore Online-Dokumentation gibt es hier:
http://docs.smartsto...nutzer Handbuch

In dem folgenden BLOG findet man interessante Tipps & Tricks zum Thema "Smartstore":

http://community.sma...t-tipps-tricks/

 


#3 SalehBagheri

SalehBagheri

    Advanced Member

  • Members
  • 31 Beiträge

Geschrieben: 21 April 2020 - 20:24

 

where are the media stored to date according to the shop settings?
Configuration -> Settings -> Media Settings
 

 

 

Hi, 

 

Thank you for your answer.

 

I changed the media storage to File System.

 

I deleted log files, and shrank the database also.

 

But It reduced database size just 30MB.

 

I think product pictures still exist in database.

 

Is it right?



#4 altmoola

altmoola

    Advanced Member

  • Members
  • 53 Beiträge

Geschrieben: 23 April 2020 - 17:02

If you have access to the database (using SSMS or something) this should give you a list of the PictureIds that are referenced on deleted Products:

SELECT *
FROM Picture
WHERE Id IN
(
    SELECT PictureId
    FROM Product_Picture_Mapping ppm
         INNER JOIN Product p ON ppm.ProductId = p.Id
    WHERE p.Deleted = 1
);

Always be careful, verify, and do a full backup before attempting to delete based on this.




Auch markiert mit einem oder mehrerer dieser Schlüsselwörter: database, size, decrease