Thursday, January 10, 2013

Re: storing large amounts of text in the DB




On Fri, Jan 11, 2013 at 12:05 PM, Mike <mike.thon@gmail.com> wrote:
My users will upload text documents ranging from hundreds to thousands of words.
What kind of documents? pdf? word docs? excel?
 
 At the moment I store the text in a TextField.  Is this going to cause a performance problem in the future or would it be better to store the text on the file system and put a file path in the data model?
 
If you are uploading to a folder and storing the path in db, then when somebody moves the folder, then you need to update the all the corresponding paths in the database.When somebody deletes the folder, then everything will be gone.You need to take care of handling duplicate names too.

Having said that.Serving from database is very slower  than serving the documents from a folder.

Just my 2 cents.
 
 The text does not need to be indexed and I'm using MySQL.  I suppose the best way is to profile the app and see if the text retrieval is a bottleneck but I thought someone on this list would already have experience in this.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/5CA4p7wHPmoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment