<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AttachmentsSizeSQL</id>
	<title>AttachmentsSizeSQL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AttachmentsSizeSQL"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AttachmentsSizeSQL&amp;action=history"/>
	<updated>2026-08-22T00:01:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=AttachmentsSizeSQL&amp;diff=219&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AttachmentsSizeSQL&amp;diff=219&amp;oldid=prev"/>
		<updated>2016-04-06T20:03:16Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Found on my disk SQL that fetches attachments sizes from RT DB. It&amp;#039;s not that trivial as we store it in headers. May be someone would find this useful. Works with mysql 4.1.x --[[RuslanZakirov]]&lt;br /&gt;
&lt;br /&gt;
 SELECT id, IF(&lt;br /&gt;
       LOCATE(&amp;#039;Content-Length:&amp;#039;, Headers),&lt;br /&gt;
       CAST(TRIM(&lt;br /&gt;
         SUBSTRING_INDEX(&lt;br /&gt;
           SUBSTRING_INDEX(Headers, &amp;#039;Content-Length:&amp;#039;, -1),&lt;br /&gt;
           &amp;quot;\n&amp;quot;,&lt;br /&gt;
           1&lt;br /&gt;
         )&lt;br /&gt;
       ) AS UNSIGNED INTEGER),&lt;br /&gt;
       BINARY LENGTH(Content)&lt;br /&gt;
     ) ContentLength&lt;br /&gt;
 FROM Attachments;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>