On 4 Mar 2014, at 3:15pm, Simon Slavin <slav...@bigfraud.org> wrote:
> On 4 Mar 2014, at 3:09pm, Eduardo Morras <emorr...@yahoo.es> wrote: > >> zSql= "SELECT r.name, s.content FROM resource AS r, static AS s WHERE (r.ids >> = s.ids AND r.name = ?);"; >> >> [snip] >> >> Error on query: out of memory > > I think this might require comparing every row in resource with every row in > static. Which is a lot of temporary data to hold in memory. > > You might try something like > > SELECT r.name, s.content FROM resource AS r JOIN static AS s ON s.ids = r.ids > WHERE r.name = ? and, of course, an index CREATE INDEX i1 on resource (name,ids) will make it run extremely quickly. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users