Container Table Clean Up

Great little clean up tip on the forums courtesy of Chris Kent.

As a consequence of how containers are created and managed, you may quickly build up records in the "container" table of your FarCry app that do not have any publishing rules. Cleaning up these records can help keep your database leaner and meaner.

Essentially you want to remove any "container" that does not have any related records in the "container_arules" table:

DELETE FROM container WHERE container.objectID NOT IN (SELECT DISTINCT parentid FROM container_arules)

Any required containers records with publishing rules will stay. Any required containers records without publishing rules will be re-created automatically when the pages are next hit.

Don't forget to backup your database if you're going to attempt any direct manipulations of the schema.

2125 views and 1 response