TRUNCATE TABLE `ns_guest`; /* delete CONNECTIONS records younger than 2023-01-01 */ DELETE FROM `ns_connections` WHERE `date_add` < '2023-01-01 00:00:00'; DELETE FROM `ns_connections_page` WHERE `time_start` < '2023-01-01 00:00:00'; DELETE FROM `ns_connections_source` WHERE `date_add` < '2023-01-01 00:00:00'; /* delete LOG records younger than 2023-01-01 */ DELETE FROM `ns_log` WHERE `date_add` < '2023-01-01 00:00:00'; /* delete PAGE NOT FOUND records younger than 2023-01-01*/ DELETE FROM `ns_pagenotfound` WHERE `date_add` < '2023-01-01 00:00:00';