On 15 Nov 2009, at 12:08am, Igor Tandetnik wrote: > select wf1.wordForm > from wform wf1 join mgWordsRelations rel on (wf1.wordNorm = rel.id_norminrel) > join wform wf2 on (rel.id_norm = wf2.wordNorm) > where wf1.ancode = 'someAncode' and wf2.wordForm = 'someWord' > order by random() limit 1; > > It's the same query, just written in a simpler form that might make it easier > for SQLite to optimize.
Also, we assume that you have all the best indexes to make the JOINs and WHEREs work quickly. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users