How can I view the largest binary files within my database?

The following SQL queries will list files from your database from largest to smallest.

SQL Server

SELECT s.name as site_name, f.cachePath, b.id, datalength(data) 
FROM cxml_blob b 
join cxml_foldercontent f on b.id=f.fileBlobId 
join cxml_site s on s.id = f.siteid 
order by datalength(data) DESC;

Oracle

SELECT f.cachePath, b.id, dbms_lob.getLength(data) 
FROM dbNameHere.cxml_blob b 
join dbNameHere.cxml_foldercontent f on b.id=f.fileBlobId 
order by dbms_lob.getLength(data) DESC nulls last;

Note: Replace dbNameHere with your actual database name.

MySQL

SELECT s.name as site_name, f.cachePath, b.id, OCTET_LENGTH(data) 
FROM cxml_blob b 
join cxml_foldercontent f on b.id=f.fileBlobId 
join cxml_site s on s.id = f.siteid 
order by OCTET_LENGTH(data) DESC;