When you say "running on the fly" do you mean running from an sqlite3 command prompt? Or are you doing this in some other programming language? Why in the world would you use a database to do this? Michael D. Black Senior Scientist Northrop Grumman Mission Systems
________________________________ From: sqlite-users-boun...@sqlite.org on behalf of Alberto Simões Sent: Sun 4/25/2010 3:39 PM To: General Discussion of SQLite Database Subject: [sqlite] Searching with like for a specific start letter Hello I am running on the fly a query to count the number of words starting with one of the 26 letters. I am doing the usual SELECT COUNT(term) from dictionary WHERE normword LIKE "a%" (for the 26 letters) normword is the term normalized without accents and the like Is there any way to make this query faster? It is taking about 10 second for 140K entries. One idea is to add a column named 'letter' and SELECT COUNT(letter) from dictionary WHERE letter = 'a'. But are there other solutions? Thanks -- Alberto Simões _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users