Reputation: 15
I need to store large file (around 1Go) on my data warehouse. To explain the global contexte simply : the user selects some options in a webview and sends it to the middleware. The middleware uses these informations and sends new ones to a factory. The factory creates the 1Go file. Now I need to store it on the data warehouse in order to be download later by the user.
I use the framework django for the middleware and the factory is programmed in python.
So my question is : for this size of files, is it better to store it on a blob field on a database ? Or is it better to store it directly on the file systeme ?
Upvotes: 0
Views: 122
Reputation: 9110
Storing you blob in database using a BinaryField
will harm the performance of your application as your querysets will have to handle a lot more data. Best practice is to store blobs in separate files and only store the file path - using models.FilePathField()
field - in your database and serve the actual image as static file. See this post for more details.
Upvotes: 1