Bryan, Thanks for the link.
-Jon -----Original Message----- From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 1:30 PM To: CF-Talk Subject: RE: Manually cleaning out cdata and cglobal tables? Here is the link: http://markme.com/cantrell/weblog/index.cfm?m=1&d=23&y=2003 ============================================ Bryan F. Hogan Director of Internet Development Macromedia Certified ColdFusion MX Developer Digital Bay Media, Inc. 1-877-72DIGITAL ============================================ -----Original Message----- From: Jon Block [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 1:22 PM To: CF-Talk Subject: Manually cleaning out cdata and cglobal tables? (cf5 question) My cdata and cglobal tables are quite large. I'm in the process of writing a custom script for cleaning them out since the automated CF management feature isn't getting rid of what I know is junk client data. I found the problem I was having to be quite interesting. I was having a short period of downtime for what was an unknown reason around 11:30AM and at 2:30AM. I later found out that the downtime was due to the coldfusion server tring to delete the expired session data from my cdata and cglobal tables. I am therefore looking into writing smarter more customized deletes on those tables. Currently, my cdata table is over twice the size of my cglobal table. From my understanding of how these tables work, that makes no sence. Would it be safe for me to write a delete that blows away the records in cdata that don't have a matching cfid in cglobal? I was thinking of something along the lines of: ---------- DELETE FROM cdata WHERE cfid NOT IN (SELECT cfid FROM cglobal) ---------- After I use the sql from above to fix the inconsistant totals from each of the 2 client storage tables, I was thinking that I could just run something else every few hours that blows away pairs of records from cdata and cglobal (that match on cfid) that have a lvisit of over 2 hours ago. That way, I expect the tables will have many less records in them. Currently, the client storage tables have hundreds of thousands of records and the database server blocks other cf pages (subsequently blocking page requests) from running while its deleting those records since I use the CLIENT scope in several web applications. Thanks, Jon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4