Hi Fangbeast, it seems that you're hitting the exact same pb as i with my mp3 player (who have to deal with 30000 mp3).
I assume that your slowiness pb is related to the display of the recipes list in the ListIconGadget.
If so, it is not really related to the SQLITE design but rather at the populating of the ListInconGadget; what you already know as you limit the display at 500 items.
Just to confirm that, i have put a timer in procedure FindRecipes() and measure the results :
the initial display show the 500 first recipes in 3600 ms (and the 26 "dessert" recipes in 220 ms).
after commenting the 2 two lines
;AddGadgetItem(#Gadget_RecipeMuncher_Recipes, -1, KillQuote(Title.s) + Chr(10) + Favourite.s + Chr(10) + Deleted.s + Chr(10) + Record.s, ImageID(ImageNumber.i))
;SetGadgetItemData(#Gadget_RecipeMuncher_Recipes, ItemCounter.i, Val(Deleted.s))
it shows nothing of course but do the loop of the 500 first recipes in 33 ms (and the 26 "dessert" recipes in 9 ms).
which is pretty clear.
The solution i found was to use a thread for the process (you did that too) and a "Virtual" ListIconGagget to speed up the populating (works only in windows as you notice also and discard).
The only way left to limit the display.
There is nothing really wrong with your actual DB design but here my optimisation advices anyway :
1) the index on recipes table is useless as it contains almost all the columns of the table. it should index few important columns with the right order.
As the most costly query rely on searching the TITLE column, you should make a index only on that one.
2) you could use some SQL PRAGMA to tweak the DB (
http://www.sqlite.org/pragma.html#pragma_page_size)
PRAGMA journal_mode = OFF
PRAGMA page_size = bytes;
3) Speed up the FindRecipes() NextDatabaseRow loop by skipping the unused columns (keep only the 4 used title,favourite,deleted,record) et modify all the "Select *" by "Select title,favourite,deleted,record) accordingly.
Less easy (demand little more coding)
it should be efficient to split the recipes table to isolate the columns containing big text (mainly Ingredients & Instructions) as they slow down the reading of the table : SQLITE reads the table page after page and if a page contains more recipes, .............
NB : i use 2 freeware to view/modify/alter SQLITE DB : sqlitespy & sqliteman
Hope it helps.