Hi, thank for your response , I tired your suggestion but results where nearly the same . Here is the schema ouput sqlite> .schema CREATE TABLE "Mega"("ID" integer,"word" varchar(255)); CREATE TABLE "parole"("ID" integer,"file" varchar(255),"word" varchar (255),"tag" varchar(255),"lemma" varchar(255),"c1" varchar(255) ,"c2" varchar(255),"c3" varchar(255),"c4" varchar(255),"c5" varchar(255)); create table tbl1(one varchar(10), two smallint); create index id_idx on mega (id ASC); create index ididx on parole (id ASC); create index word_idx on mega (word ASC); create index wordidx on parole (word ASC); sqlite> sqlite> PRAGMA cache_size ...> ; 400000 sqlite> PRAGMA store_temp; sqlite> PRAGMA default_store_temp; sqlite> PRAGMA default_temp_store; 2 sqlite> PRAGMA temp_store; 2 sqlite>PRAGMA synchronous 0
Data are like the following parole 1 #10033 NO ADV no 2 #10033 a PRE a 3 #10033 privatizzazioni NOM privatizzazione 4 #10033 e CON e 5 #10033 esternalizzazioni INT <unknown> 6 #10033 al PRE al 7 #10033 Comune NOM comune 8 #10033 , PON , 9 #10033 i DET il 10 #10033 contratti NOM contratto 11 #10033 a PRE a 12 #10033 termine NOM termine mega 1 comune 2 paese 3 torino 4 napoli and so on, nothing special. Hope this can help. Thank in advance Alex > > Try: > select parole.id, mega.id from parole JOIN mega ON mega.word=parole.word; > > Please, post the table schema and some sample data (so we are able to > make tests quickly). > > Paolo > >