phplist_usermessage database table size

Solutions for other advanced phplisters

phplist_usermessage database table size

Postby RossK » 1:14pm, Thu 31 Mar, 2011

Hello all,

My web host is complaining that the table phplist_usermessage is taking up too much room on their server. It's over 159,000 rows after just a couple of months of using phplist for once-a-week emailing to a fairly large list.

I'd like to understand what that table does for me, what I would lose by not having it, and if it's possible to modify something so that the table no longer gets updated.

Alternatively, would there be a way to write a script that deletes any table rows older than X days which I could run once a week or something like that?

Thanks very much for any help with this!
phpList newbie
Posts: 4
Joined: 5:21pm, Fri 07 Jan, 2011

Re: phplist_usermessage database table size

Postby duncanc » 5:53am, Sat 02 Apr, 2011

The usermessage table keeps track of which messages have been sent to which users. It is the mechanism for phplist to avoid sending a message to a user more than once.

The safest way to reduce its size is to delete old messages. As well as the old message being deleted the associated rows in the usermessage table will also be deleted.

If you dont't want to delete old messages then you can use phpmyadmin to delete just the associated old rows from this table. I'd do it on messageid rather than date created.
Run the first sql query to see how many rows will be removed, then the second query to delete those rows

Code: Select all
select count(*)  from phplist_usermessage
WHERE messageid = xx

delete from phplist_usermessage
where messageid = xx

Bear in mind that if you send the old message again, then it would then be sent to all of your users.
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest