I just checked my production environment, and my database had the following

advagg_aggregates ~25,148 rows
advagg_aggregates_hashes 13 rows
advagg_aggregates_versions 1,347 rows
advagg_files 335 rows

I am a bit concerned with the first and less about the 3rd. Is there a way where these files can be handled with Cron jobs? Or can I truncate them with time?

Comments

mikeytown2’s picture

Title: DB logs » Lots of entries in the advagg_aggregates and advagg_aggregates_versions tables
Category: bug » support
Status: Active » Closed (works as designed)

advagg_cron will truncate these with time (see advagg_remove_old_unused_aggregates()). The default is to remove any aggregate info from the database if that aggregate has not been accessed in the last 6 weeks.

The less combinations of CSS/JS files, the smaller the advagg_aggregates table will be. This records the combination and order of CSS/JS files used on your site. The advagg_aggregates_versions table is a record of the contents hash, wither this is a root or derivative aggregate, and access time with the filenames hash in there so the data can be joined to the advagg_aggregates table.

felixodie’s picture

Issue summary: View changes

Hi there,

I've got the same issue. I set Advagg to remove the files from database after 2 days, however that's the minumum I can select. I still get 2 gb of data in my database from Advagg in 2 days, is that something weird?

Is it possible to set it for 3 hours maybe?

mikeytown2’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
Status: Closed (works as designed) » Active

2GB in 2 days seems excessive. How many rows are in the tables? I would expect around 500k in a big site which would be around 250mb. I could toy around with the idea of using the ascii_bin collation and switching to char from varchar.

mikeytown2’s picture

Created an issue because that change also speeds up the bundler query #2487087: Speed up the bundler, use char instead of varchar; also use ascii_bin instead of utf8_bin

mikeytown2’s picture

Status: Active » Postponed (maintainer needs more info)

Can you let me know if the changes in the other issue helped out here?

mikeytown2’s picture

Component: CSS/JS Compression » Code
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Closing this out.