Create Attachments on the local filesystem

Jason Pyeron jpyeron at
Mon Oct 20 23:47:51 UTC 2003

To change the thread a little, 

We and our clients would like to see much larger attachments supported.
To deal with the possiblity of huge files (100MB+) there will need to be 
some archiving facilities.

create table files
 id int not null pk,

 createdate timestamp not null,
 accessdate timestamp not null,

 data longblob null,

 archivelocation varchar(255) null 
 -- this is a sysadmin defined value
 -- it is not null iff data is null.


 minold=180    //days
 weight=18000  //days*size in MB

 SELECT * FROM files 
  WHERE TO_DAYS(NOW())-TO_DAYS(accessdate)>=minold 
  and LENGTH(data)*(TO_DAYS(NOW()) - TO_DAYS(createdate))>=weight

 for each item in result set (res)



  UPDATE files SET archivelocation=TAPEid+":"+entryindex, data=NULL WHERE


then if BZ tries to fetch an atachment and the data is null it should then 
post the contents of archivelocation...

then the user can bug the sysadmin for a restore (which is simple)

--Jason Pyeron

On Mon, 20 Oct 2003, Christopher Hicks wrote:

On Mon, 20 Oct 2003, Myk Melez wrote:
> What gets much slower?

keep levers as _simple_ machines.

It just seems so so much easier to let the database take care of it (and
it seems to do that just fine) than to try to overcome the filesystem
scaling issues, yet many people going down that road anyway.  One of the
biggest selling points I've repeatedly heard in the community for using
bugzilla is it's performance and scalability far surpass the competition.  
Maybe that's because it relies on a database to store the data?  The slow 
competition is still slowly catching on to this I'm sure.

-                                                               -
- Jason Pyeron            -
- Partner & Sr. Manager         Pyerotechnics Development, Inc. -
-                               500 West University Parkway #1S -
- +1 (410) 808-6646             Baltimore, Maryland  21210-3253 -
-                                                               -

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.

More information about the developers mailing list