0

I have to read an image in a servlet and show it in a response on JSP. For the performance purpose, i need to know which storage medium will result in maximum performance for IMAGE READING.

  1. Reading images from the DISK (some location on the server)
  2. From Database

keeping in mind that these images will be in millions(3 million plus) and will increase over time. thanks

usman
  • 1,351
  • 5
  • 23
  • 47
  • 1
    Do not stop with the first answer in that question, refer to other answers as well to get more info, like [this article about Facebook Storage of Photos](http://perspectives.mvdirona.com/2008/06/30/FacebookNeedleInAHaystackEfficientStorageOfBillionsOfPhotos.aspx) – Luiggi Mendoza Mar 20 '13 at 05:55

2 Answers2

1

As per my understanding, files if they are not very sensitive they should kept on Disk rather than in Database, because later on your database server and application may be located on two different machines and in that case it would be very expensive work to retrieve binaries data over the sockets if they are heavy.

Aman Gupta
  • 5,548
  • 10
  • 52
  • 88
  • Since it looks that you're *new* to the site, please refrain of posting answer that are comments until you have enough rep to post comments. Also,it would be better if you flag the question as duplicated since the duplicate question contains more than 50 answers on the topic. – Luiggi Mendoza Mar 20 '13 at 06:00
  • @LuiggiMendoza It seems like an answer, even if a bit "soft". –  Mar 20 '13 at 06:02
  • @pst I have my doubts that's why I just left a comment. – Luiggi Mendoza Mar 20 '13 at 06:04
0

1 : storing images in the DB is a heavy process
2 : storing on the server is lighter and faster

3 : but you have to maintain the server space probably keep deleting the unrequired images from server location ,if server gets reduced space , then your application performance is affected