Reputation: 25807
We building big Web Application and we use mysql, we want to make mysql database more fast. Some of us think if we will put message html body inside table and not inside text.txt in will make database heavy and not fast. Thanks,
*Part of main table that hold message: option 1:hold html message body inside database
message {
id (int)
subject (varchar)
body (text)
}
option 2: hold html message body inside body1.txt file
message {
id (int)
subject (varchar)
file_body_path (varchar)
}
*
Upvotes: 3
Views: 690
Reputation: 425371
If you:
, then you better store them out of the database.
The HTTP
server will serve the disk-based files much faster to begin with.
Upvotes: 2
Reputation: 8849
As Quassnoi correctly points out, the webserver will most likely be faster serving txt files than data from the DB ...
BUT: This only works if the webserver doesn't have to run any searches/queries against the DB to build the links between the TXT files.
Think of these use cases:
each of these use cases will require your parsing the TXT file and maintaining all the needed links in the 'index-pages'. How will you do this in your content management system?
Upvotes: 1