On 16 Mar 2011, at 7:19pm, Jeff Archer wrote: > I have found that I can use this select to get the names of all existing > indexes: > > select name from sqlite_master where type = 'index' and sql is not null;
You can also be specific about which table you want by filtering on the table name. > Then I can iterate the result and drop each index. > > > > This leaves me with 2 questions. > > 1. How stable are the column names and table contexts of the > sqlite_master table? They're dependable in this context. > 2. Is there a better way to accomplish this without resorting to > explicit query of the sqlite_master table? No I think you found the best way to do it with SQLite. You should almost never be creating indexes on the fly. Bear in mind that if SQLite finds a search that would be better with an index, it creates it itself and it is far better at working out the best index than you are. The only disadvantage is that it will recreate the index each time you do that SELECT. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

