Tenderlove Making - Detecting Full Table Scans With SQLite
I’m at RubyConf this week, and it’s great! I recently read that lobste.rs is now running on SQLite. One part from the post caught my attention: I wish we could say in a test, “Fail if you encounter any full table scans”. Which would have caught the perf issues we experienced during the first deploy. SQLite collects information about prepared statements and exposes those statistics though an API. The upshot of this is that we can tell whether a statement did a full table scan after executing the





