On Wed, Jun 27, 2012 at 2:55 PM, Paul Vercellotti <pverce...@yahoo.com>wrote:
> > > Hi there, > > We are considering using the SQLite Encryption Extension in one of our > products, and are wondering what the performance characteristics of it are? > Does the encryption algorithm affect performance? Any stats on this you > might have would be useful. > SEE is a drop-in replacement for public-domain SQLite. In other words, it will read and write ordinary unencrypted database files, and it will do so with no speed penalty. If you enable encryption, however, SQLite has to run your chosen encryption algorithm whenever content is read from disk, or written to disk. Whether or not this effects performance, and by how much, depends heavily on your application (how much it uses the database), which encryption algorithm you choose, and on the relative speeds of CPU versus I/O on your target platform. Your worst-case performance hit is probably going to be about 50%. In other words, a query that used to take 100us would now take 150us with AES 128-bit encryption enabled, the extra fifty microseconds being time spend running the encryption/decryption algorithms. This worst case is for queries that have to do actual disk I/O. Queries out of SQLite's internal cache use pre-decrypted content and do not slow down at all. A typical application will sometimes hit the cache and sometimes go to disk, resulting in a performance hit somewhere in between. For performance sensitive applications, what developers sometimes do is break up their content into sensitive and non-sensitive, storing each in separate databases, and only encrypt the sensitive content. SEE is able to open both databases at once (using the ATTACH command) and do joins on tables between the two databases, even though only one of the two is encrypted. > > Thanks! > > -Paul > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users