Dennis Cote schrieb: > Michael Schlenker wrote: > >> Basically i have to check a larger number (might be around 10.000 or more, >> but usually far less) of ids against my (incomplete) metadata catalogue to >> find out if those ids are locally available or need to be fetched from a >> remote (slow) location. >> > > Since you have to handle up to 10K uuids in the string, your pivot table > must have that many rows. To ensure SQLite doesn't waste time doing a > full table scan on pivot table you should make column n an integer > primary key, or you can simply use a limit clause instead of the comparison. > > (SELECT substr(?,(n-1)*16,n*16) FROM pivot LIMIT ?) >
n is an integer primary key..., is LIMIT better than a where condition in that case? Michael -- Michael Schlenker Software Engineer CONTACT Software GmbH Tel.: +49 (421) 20153-80 Wiener Straße 1-3 Fax: +49 (421) 20153-41 28359 Bremen http://www.contact.de/ E-Mail: [EMAIL PROTECTED] Sitz der Gesellschaft: Bremen Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users