Gossamer Forum
Quote Reply
Database?
Hi,

I have been wondering why GM uses a Flat file database to store e-mails? All details except the actual mails seem to be using the MySQL database.
What are the benefits of using a flat file database?

To me it would seem more logical to have all data (prefs and mail) in the MySQL database as this would make backup, server load balancing, MySQL mirroring on another server and reinstallment and server moves a lot easier.

Most other mail packages seem to use a MySQL solution.

thanks
Quote Reply
Re: [Surfer2] Database? In reply to
In Reply To:
What are the benefits of using a flat file database?
Emails are stored on hard disk because of database limitations. Databases like MySQL have a limitation of 1MB for each record, so if you get a 2MB email, it can't go into the database. We do store parts of the message in the database for search purposes.

Adrian
Quote Reply
Re: [brewt] Database? In reply to
How do other e-mail solutions that use MySQL as the only storage medium handle this limitation?
Quote Reply
Re: [Surfer2] Database? In reply to
Hi,

We don't store the messages in a flat file database. The message bodies are stored on disk. MySQL by default can't store more then 2gigs of data in a single table, and breaking it up into multiple tables is not a good idea. Also, MySQL is not the most reliable database, and repairing indexes on large tables is very slow. This means long down time if you ever have corrupt tables. Also, files are better for backups as you only copy changed files, not a single large file. Much less to backup.

We have had systems with more then 1.5 million emails taking up 60 gigs of disk space and the system works smoothly. When you do get to a site that size, it does require a good host who can provide reliable backups, and quality hardware though.

Cheers,

Alex
--
Gossamer Threads Inc.