Jump to content

Nettoyage de base de donnée PS 1.7.8.9


Recommended Posts

Bonjour,

J'aimerai nettoyer ma bas de donnée mais je ne suis pas sur à 100% de mes requêtes et même si j'ai un backup je préfère demander ici avant ce que vous en pensez:

Nettoyage mb_connections , ps_connections_source et ps_connections_page
DELETE c, cs, cp
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
LEFT JOIN ps_connections_page cp ON (c.id_connections = cp.id_connections)
WHERE c.date_add < '$date_moins_6_mois'

Nettoyage ps_cart et ps_cart_product
DELETE c, cp
FROM ps_cart c 
LEFT JOIN ps_cart_product cp ON (c.id_cart = cp.id_cart)
WHERE 
c.date_add < '$date_moins_6_mois'
AND c.id_cart not in (SELECT id_cart from ps_orders)

Nettoyage ps_guest
DELETE g
FROM ps_guest g
WHERE g.id_customer = '0'
AND g.id_guest not in (SELECT id_guest from ps_cart)

Nettoyage ps_log
DELETE c
FROM ps_log c
WHERE c.date_add < '$date_moins_6_mois'
 

Ai-je oublié quelque chose ?
Merci d'avance 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...