Huge database size

Hi,

After only a couple of weeks of installing and using phplist (which, until now seems to be a great program and thanks to all the contributors for that), my database has grown to almost 700 MB!

Most noticeably:

  • phplistsessions is 445MB (with ~12000 rows)
  • and phplist_linktrack_forward is 200MB ( with >200,000 rows)

I have about 5000 subscribers and I’ve sent 2 newsletters till now. There are a lot of customized links in there (for analytics purposes), so I get it’s a lot of data. But 200MB for only 2 newsletters seems huge!
phplist_linktrack_ml has the same amount of rows but is only 16MB.

As for phplistsessions, I’ve been heavily using the admin interface the past couple of weeks (uploading contacts, trying to learn the program etc). It regularly logs me out (not after each action though as in another case I read about so I don’t consider that an issue) and that might be creating new sessions i guess. But again, 445MB?

Is it safe to empty that table and see how fast it grows again? I imagine it is, but I wanted to make sure to avoid breaking anything.

Thanks in advance for your time and help!

@alejaaandro The default is to store sessions in the file system, not the database. Why have you changed that?

phplist_linktrack_forward will have one row for each unique URL used in a campaign. Why have you had 200,000 unique URLs?

Regarding the links, I did some calculations and that sounds reasonable.

  • Our newsletter features about 4 items each week
  • each one has at least 4 (and often more) ways to access it (image, “read more” button, thumb at the top of the newsletter, thumb of related video etc) and each has a different url since I want to know specifically which one is used.
  • all those links are unique for each subscriber since I add their id to track them in my analytics program.
  • add the “preferences” and “unsubscribe” buttons…

It adds up to a lot of links indeed!
Since I’m tracking it through my analytics anyways and this creates the problem with this huge table in phplist, I think I’ll disable click tracking in phplist for now.

But, if I may suggest an idea to enhance this functionality or even solve this problem (if you consider it as such):

EDIT: I found reports of this issue already, I will report the solution there in order not to continue a duplicate discussion here. (https://mantis.phplist.org/view.php?id=17757#c58664 | Custom Links and click tracking )

Regarding the sessions, I don’t really know why I did that. I saw the option in the config file and thought I should use it. Seems it was dumb of me

I have commented out this line
$SessionTableName = “phplistsessions”;
from my config file.

  • This should be enough, right?
  • Can I now safely delete the table in the database?

I think so. Sessions will now be stored in the default place set by php. You can check that through phpinfo(). Possibly that was also a factor in you being logged-out erroneously.