Deleting Assets

Caleb Tonn's Avatar

Caleb Tonn

28 Sep, 2010 02:36 PM

I have been cleaning up our installation of cascade getting rid of a bunch of cruft we don't use anymore. I have noticed when I delete assets in the application the DB doesn't seem to get any smaller. Our cxml_foldercontent table for example is at 3.4 million rows and never seems to get smaller only bigger.

  1. 1 Posted by Joel on 28 Sep, 2010 02:42 PM

    Joel's Avatar

    HI Caleb,

    What type of assets are you deleting?

    Please let me know.

    Thanks!

  2. 2 Posted by Caleb Tonn on 28 Sep, 2010 02:51 PM

    Caleb Tonn's Avatar

    I am deleting folders, blocks, pages, templates, stylesheets and not small amounts of these things like 100's I was looking for some movement in our DB in the smaller direction not a lot. Our DB is pretty huge 23GB

  3. 3 Posted by Joel on 28 Sep, 2010 03:09 PM

    Joel's Avatar

    Caleb,

    Perhaps the size of your database is more attributed to actual binary content within it, such as files, etc... found within the blob table? Could this be the case? Also, depending on which version you are on, please be sure to clear the Recycle Bin as well.

    Thanks!

  4. 4 Posted by Caleb Tonn on 28 Sep, 2010 03:18 PM

    Caleb Tonn's Avatar

    That very well may be the case. Our cxml_blob table is 3.9GB I am cleaning up our prod instance in preparation to upgrade it to 6.7.2 it is currently 5.7 so I don't think we have a recycle bin. I did notice our mail table is huge is there a way to just delete everyones mail I don't think anyone checks it and deletes it in the app.

  5. 5 Posted by Caleb Tonn on 28 Sep, 2010 03:19 PM

    Caleb Tonn's Avatar

    Also back to my original point does deleting things in the app really remove a row from the DB our is it more of a "soft delete"

  6. 6 Posted by Joel on 28 Sep, 2010 04:01 PM

    Joel's Avatar

    Caleb,

    Deleting the data will in fact remove it from the database, so whatever you delete should certainly be represented by the size, dependent upon you having any extra redundancy regarding your database configuration (you might want to consult your DBA regarding this, as it is not associated with Cascade Server).

    To delete all mail for all users, you can do this via the following via the Optimize Database Tool or a SQL query (the former being preferred as we advise against modifying the database directly).

    delete from cxml_mail;

    To delete mail from single users, you can use the following:

     delete from cxml_mail where receiver = 'username';

    Thanks!

  7. 7 Posted by Caleb Tonn on 28 Sep, 2010 05:17 PM

    Caleb Tonn's Avatar

    One more question as regards to deleting. I am trying to delete a target and am getting this error.

    An error occurred during deletion: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

  8. 8 Posted by Joel on 28 Sep, 2010 05:21 PM

    Joel's Avatar

    Caleb,

    Could you attach you entire cascade.log file from when this occurs? Also, does this error message display within the application itself or just within the log? Please let me know.

    Thanks!

  9. 9 Posted by Caleb Tonn on 28 Sep, 2010 06:01 PM

    Caleb Tonn's Avatar

    Here is an excerpt. It seems we have a larger issue as no changes can be saved due to a DB lock.

  10. 10 Posted by Joel on 28 Sep, 2010 07:52 PM

    Joel's Avatar

    Casey,

    Try restarting Cascade Server to release the lock. Please let me know what you find.

    Thanks!

  11. 11 Posted by Caleb Tonn on 28 Sep, 2010 08:14 PM

    Caleb Tonn's Avatar

    Ok that worked. I think we are good I got my answers and that seemed to fix several of our issues.

  12. 12 Posted by Joel on 28 Sep, 2010 09:25 PM

    Joel's Avatar

    Good deal Caleb!

  13. Joel closed this discussion on 28 Sep, 2010 09:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac