would it run faster if you add two columns to the Hast table - randmax and randmin
update Hash set randmax = max((<#randomnumber> % 255)-10,0) update Hash set randmin = min((<#randomnumber> % 255)+10,255) CREATE INDEX HASH_RMIN_IDX ON HASH (RANDMIN); CREATE INDEX HASH_RMAX_IDX ON HASH (RANDMAX); Select H1.ID from HASH1 H1 where x1_y1_min >= randmax and x1_y1_max <= randmin and x1_y2_min >= randmax and x1_y2_max <= randmin and x1_y3_min >= randmax and x1_y3_max <= randmin and x1_y4_min >= randmax and x1_y4_max <= randmin and x1_y5_min >= randmax and x1_y5_max <= randmin; _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- View this message in context: http://old.nabble.com/how-to-speed-up-this---tp30524605p30524963.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users