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
  • PunktPunktPunkt
  • 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?


S Ʌ L Ξ H - B Ʌ G H Ξ R I

Microsoft Certified Professional


#2 Wolfgang Schmerge

Wolfgang Schmerge

    V.I.P

  • Members
  • 2454 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

Shopbetreiber benötigen Ihre Hilfe! Bewerten Sie jetzt Smartstore auf Capterra.
Als Dankeschön erhalten Sie 20 Euro für Ihren nächsten Kauf im Marketplace.
Smartstore bewerten


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:
https://smartstore.a...iew?mode=global
In dem folgenden BLOG findet man interessante Tipps & Tricks zum Thema "Smartstore":
http://community.sma...t-tipps-tricks/

#3 SalehBagheri

SalehBagheri

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 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?


S Ʌ L Ξ H - B Ʌ G H Ξ R I

Microsoft Certified Professional


#4 altmoola

altmoola

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 66 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.


  • SalehBagheri gefällt das


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