Hello everybody, I already saw this discussed in 2006 (see http://www.mail-archive.com/sqlite-users@sqlite.org/msg14703.html), but there was no final answer.
I'm thinking about storing some bigger data blocks in a database, or, if that's not efficiently doable, address files in the filesystem (eg. via the primary key). Using the DB directly has the advantage that the file is already open, so directory lookups and secondary/tertiary block pointers loading can be avoided. I'd like a way to specify "send N bytes from position P from field F of record R", where the record would be specified via some WHERE clause. The simplest case would be addressing via the primary key; in this case sqlite could (depending on the internal structure?) maybe just do a sendfile() (see http://linux.die.net/man/2/sendfile) without ever reading the data (if the primary key can be converted to a position in the database file). Apart from using some copies (which would be the major benefit over using some other DB that has to be accessed via some socket) this could also provide cache benefits, and reduces memory usage (as no buffers are needed, which might be several MB big). Regards, Phil -- Versioning your /etc, /home or even your whole installation? Try fsvs (fsvs.tigris.org)! _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users