Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>Storing video in a SQLite database is a horrible idea. Don't do it.</h1> <p>Don't put large BLOBs in a database. Put them in the filesystem next to your database file and then write the filenames or an URL to the database. This will be a ton faster, will use the database much more efficiently, will minimize I/O (in that the video won't have to be broken up into the paging scheme of the database, and will make management of the videos easier (a filesystem <code>delete</code> of a file is a <em>ton</em> faster than a database having to excise a bunch of pages that contain the BLOB).</p> <p>Putting BLOBs in the database is horribly inefficient and, quite possibly, will blow out your app's memory use, too (unless you have figured out a way to stream data from the database to the video decoder).</p> <p>It will incur extra I/O, use more power, and performance will generally go to hell as you store more items in the database. If you are mixing BLOBs with small datums in the database, you can quite easily end up with a pathologically fragmented database. Auto-vacuuming will help, but it is yet more inefficiency, more I/O and more battery life consumed.</p> <hr/> <p>Yes, there are databases that handle BLOBs fairly well. And they are completely irrelevant to this question whose only tag is "iPhone".</p> <p>Note that the answer to the question "handles BLOBs and streaming media better than the filesystem" pretty much always requires that you are using a database that is reading/writing to/from a raw device -- a partition on a hard drive that is nothing but database contents. Any other solution will necessarily be a layer on top of an existing filesystem and there will be cost, even if the database vendor has done all the engineering work (and it is huge) to match they database access I/O as much as possible with underlying filesystem semantics.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload