Hey guys.

I have an 1000 row table that looks like this:

CREATE TABLE IF NOT EXISTS globalRankingTable (id INTEGER PRIMARY KEY 
AUTOINCREMENT, name TEXT NOT NULL UNIQUE, ranking TEXT, score REAL, 
record TEXT);

And a "friends" table which looks like this:

CREATE TABLE IF NOT EXISTS friendTable (id INTEGER PRIMARY KEY 
AUTOINCREMENT, simpleId TEXT NOT NULL UNIQUE, player TEXT, friend TEXT);

I need to:

Select all from globalRankingTable

Go through each row

Find whether "name" is a "friend" of my current user (ie, does name 
concatinated with username appear as "simpleid" in friendTable)

At the moment, this is really slow - can anyone suggest optimisations?  
I'm pretty new to dbs.

Thanks,
Ian
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to