On Fri, Jan 31, 2014 at 8:49 PM, Stephen Chrzanowski <pontia...@gmail.com> wrote:
> I've not done anything to 'generate' a SQL statement, but I can see the use > of this just as a debugging tool to figure out why something is taking so > long. I might just implement that in the wrapper I use and test for DEBUG > or RELEASE modes. > For my current project for my employer, I wrote an interface in front of SQLite so that the other developers on the team would not need to know as much about it. As a result, "less than optimal" SQL was abundant (and I'm not a SQL guru in the first place, so if I can find flaws in it ... well, yeah). In any case, as part of my interface I wrote some code to log every unique query that came through along with the explain query plan output for the query. This gave me the benefit of finding queries that were manufactured without bound parameters *and* information that led to creation of ideal indexes (indices?). You might consider something similar (and I'm really hoping such functionality doesn't already exist in SQLite as shipped, because I'll feel foolish for reinventing the wheel). -- Scott Robison _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users