Quote:
|
Originally Posted by jigen7
as what he have said because these columns would still be loaded to the process/memory even the i have this only query ex. (select image_thumb from table) thus it will also load image_full, which i think do not.
|
I don't think your boss is correct. Unless you do a "SELECT * FROM..." only the columns specified in the select list will be returned to the client. You can demonstrate it to your boss by doing an EXPLAIN of the query (with the VERBOSE option).
As for the server memory usage, in recent versions of PostgreSQL long data are stored separately from the other data types (see TOAST in the Postgres documentation) and will not be accessed on disk at all, unless referenced in the query, so you should be OK from that point of view as well.
Quote:
|
Originally Posted by mike_bike_kite
Storing images in the database is usually slower than storing them in the file system. If you just store the file name in the user record and then get the html to point to that image file.
|
There are some disadvantages of storing images in the file system as well. First of all, file system is outside of the database transaction control, so you have to deal with the ACIDity of files somehow. Also, there is an issue of data integrity at a higher level; for example, nothing prevents you from deleting an image file from the file system and the database will never know about it.