V1.7 database Cleaner Module

mkr

New member
XNullUser
Joined
Apr 29, 2021
Messages
19
Reaction score
2
Points
3
NullCash
17
dear members i need a module that can clean my database and make my website more faster
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,538
Reaction score
1,528
Points
113
NullCash
4,551
You able to clear DB by you self without module. Make backup before using.

Case 1​

Remove data from those tables​

Run following command in your phpMyAdmin:

TRUNCATE TABLE ps_connections;
TRUNCATE TABLE ps_connections_page;
TRUNCATE TABLE ps_connections_source;
TRUNCATE TABLE ps_pagenotfound;
TRUNCATE TABLE ps_statssearch;

Case 2​


# Delete all logs
TRUNCATE ps_log;


# Delete old connection data (only used for stats)
# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';

OPTIMIZE TABLE ps_connections, ps_connections_source;


# Delete all guest without entry in ps_customer table
DELETE g
FROM ps_guest g
LEFT JOIN ps_customer c ON (g.id_customer = c.id_customer)
WHERE c.id_customer IS NULL;

OPTIMIZE TABLE ps_guest;


# Delete tables
# Scenes are deprecated in 1.6 (used only if upgrading with feature active)
DROP TABLE `ps_scene`;
DROP TABLE `ps_scene_category`;
DROP TABLE `ps_scene_lang`;
TRUNCATE `ps_scene_products`;
DROP TABLE `ps_scene_shop`;
UPDATE `ps_configuration` SET value='0', date_upd=NOW() WHERE `name` = 'PS_SCENE_FEATURE_ACTIVE';
 

hxcode

Well-known member
Master
Diamond
Elite
Joined
Aug 16, 2020
Messages
3,507
Reaction score
406
Points
83
NullCash
3
You able to clear DB by you self without module. Make backup before using.

Case 1​

Remove data from those tables​

Run following command in your phpMyAdmin:

TRUNCATE TABLE ps_connections;
TRUNCATE TABLE ps_connections_page;
TRUNCATE TABLE ps_connections_source;
TRUNCATE TABLE ps_pagenotfound;
TRUNCATE TABLE ps_statssearch;

Case 2​


# Delete all logs
TRUNCATE ps_log;


# Delete old connection data (only used for stats)
# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';

OPTIMIZE TABLE ps_connections, ps_connections_source;


# Delete all guest without entry in ps_customer table
DELETE g
FROM ps_guest g
LEFT JOIN ps_customer c ON (g.id_customer = c.id_customer)
WHERE c.id_customer IS NULL;

OPTIMIZE TABLE ps_guest;


# Delete tables
# Scenes are deprecated in 1.6 (used only if upgrading with feature active)
DROP TABLE `ps_scene`;
DROP TABLE `ps_scene_category`;
DROP TABLE `ps_scene_lang`;
TRUNCATE `ps_scene_products`;
DROP TABLE `ps_scene_shop`;
UPDATE `ps_configuration` SET value='0', date_upd=NOW() WHERE `name` = 'PS_SCENE_FEATURE_ACTIVE';
good sharing, thanks bro
 

Camelo

Member
XNullUser
Joined
May 25, 2021
Messages
193
Reaction score
4
Points
18
Location
Tunisia
NullCash
2
Great tips amigo!
 

fornes

New member
XNullUser
Joined
Jan 18, 2021
Messages
7
Reaction score
0
Points
1
NullCash
3
good share, thank you very much for everything
 

trakr

Member
XNullUser
Joined
Apr 8, 2021
Messages
278
Reaction score
0
Points
16
NullCash
3
You able to clear DB by you self without module. Make backup before using.

# Delete old connection data (only used for stats)​

# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';

Is the date 2016-02-01 in your example the date "FROM" when the connections will be deleted ? It will delete from year 2016 to current year?
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,538
Reaction score
1,528
Points
113
NullCash
4,551
Is the date 2016-02-01 in your example the date "FROM" when the connections will be deleted ? It will delete from year 2016 to current year?
2016,1015,2014......
c.date_add (all dates in base below )< (this date) '2016-02-01 00:00:00'

Greetings
 

freiserk

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Master
Joined
Jan 24, 2019
Messages
3,495
Reaction score
6,548
Points
113
NullCash
33,484
Here:

 
Top