Re: Re: Re: [sqlite] Poor performance searching from multiple DBs
>It's not the first field in the index, so I don't think it >will use it >for searching on "WHERE field5 = 'xxx' ". >Try adding an index on field5 only > CREATE UNIQUE INDEX main_indexf5 ON main (field5); >I don't see any problem. Thanks Jay. You are right. The query in a PC change from 34 Secs to 0,036 secs. Nice. Thanks for your suggestions. China. --- Scegli il tuo dominio preferito e attiva la tua email! Da oggi l'eMail di superEva e' ancora piu' veloce e ricca di funzioni! http://webmail.supereva.it/new/ ---
Re: Re: [sqlite] Poor performance searching from multiple DBs
> >> I have to search for field5 in some DB files (30 or more >>for a total of > >> 50 GB of space and 150 M of records ). > > >> select * from main where field5= "AABBCCDD"; > > > > > Did you put an index on field5? > > Yes I use: > > CREATE UNIQUE INDEX main_index ON main (field2,field5,field7); It's not the first field in the index, so I don't think it will use it for searching on "WHERE field5 = 'xxx' ". Try adding an index on field5 only CREATE UNIQUE INDEX main_indexf5 ON main (field5); > > > > Is a quite complex index used for eliminating duplicates, is it OK? I don't see any problem.
Re: Re: [sqlite] Poor performance searching from multiple DBs
>> I have to search for field5 in some DB files (30 or more >>for a total of 50 >> GB of space and 150 M of records ). >> select * from main where field5= "AABBCCDD"; > Did you put an index on field5? Yes I use: CREATE UNIQUE INDEX main_index ON main (field2,field5,field7); Is a quite complex index used for eliminating duplicates, is it OK? China. --- Scegli il tuo dominio preferito e attiva la tua email! Da oggi l'eMail di superEva e' ancora piu' veloce e ricca di funzioni! http://webmail.supereva.it/new/ ---
Re: [sqlite] Poor performance searching from multiple DBs
> > I have to search for field5 in some DB files (30 or more for a total of 50 GB > of space and 150 M of records ). > > The DBs have the same structure. > > I want to find the string (if exist) in all DBs. > > The query is like this: > > > > select * from main where field5= "AABBCCDD"; Did you put an index on field5?