3 ms·
Would it save processing time? Why do you think it would? How do you plan to manage the queue - by writing your own "database"? If you queue them somewhere, you
by gaius 18y ago
Would it save processing time? Why do you think it would? How do you plan to manage the queue - by writing your own "database"? If you queue them somewhere, you'll end up having to do two writes, one to your queue and one eventually to the database. So that's adding more processing.
It's a serious question. Have you benchmarked this? Writing BLOB data to any reasonable database (or storing it as BFILE if you must) is imperceptibly slower than a filesystem write. In the case of MySQL the database is just syntactic sugar sprinkled on the filesystem. In the case of Oracle on raw volumes it's going to be faster to write to than a cooked filesystem. If you're worried about huge transactions, just COMMIT each one and add a column for approved_yn that you update in a single transaction when the user is happy.
- amrithk 18y agoSorry if I am not being clear. I am not uploading each image as a BLOB. Rather, I am storing a bunch of strings in the database that will later help me point to the actual image (which is first stored in the local webserver but is pushed into Amazon S3 after the user has finished with the form). I want to avoid these multiple writes to the database (which stores various pointers to the image) and just do one large write operation at the end. Does this not matter? Would you know any benchmarking tools that will help me measure this? Thanks