> Is there any way out except create index on it. No.
When working with databases one always has to choose: either you can insert very fast and don't have any indexes or your selects work fast and you have some indexes. But using only one index slows down inserts at so small fractions of millisecond that only very rare critical applications are able to feel it... Pavel On Wed, Dec 16, 2009 at 7:48 AM, Ram Mandavkar <[email protected]> wrote: > > readmode table gets updated on frequently basis so i can not create index on > it. > > Is there any way out except create index on it. > > > Pavel Ivanov-2 wrote: >> >>> Why not just make epc column "unique on conflict ignore"? >>> i.e. >>> CREATE TABLE readmode( epc text unique on conflict ignore, col2 text... >>> ); >>> >>>> one EPC ( say:'e2003411b802010994095761' i.e. 24char ) out of 5000 >>>> records. >>>> and select query take 2-3 sec. to give result output. >>>> >>>> By any means i can reduce this search time with EPC as search criteria. >> >> If you don't want to make it unique at table definition then create an >> index on it ('unique' constraint creates an index for you) - it will >> speed up any searches on EPC. >> >> >> Pavel >> >> On Tue, Dec 15, 2009 at 4:54 AM, Simon Davies >> <[email protected]> wrote: >>> 2009/12/15 Ram Mandavkar <[email protected]>: >>>> >>>> Hello All, >>>> >>>> I am New to SQL-Lite DB, >>>> I had one ASSET table having EPC as varchar(50) field and 5000 records >>>> in >>>> it. >>>> >>>> If i want to search >>>> ( >>>> CREATE TRIGGER "main"."TR_MULTIREAD_BEFORE" BEFORE INSERT ON READMODE >>>> BEGIN >>>> SELECT CASE >>>> WHEN M.a = NEW.EPC THEN RAISE( IGNORE ) >>>> ELSE 1 >>>> END >>>> FROM >>>> ( SELECT EPC AS a FROM READMODE where EPC=NEW.EPC ) AS M; >>>> END >>>> ) >>> >>> Why not just make epc column "unique on conflict ignore"? >>> i.e. >>> CREATE TABLE readmode( epc text unique on conflict ignore, col2 text... >>> ); >>> >>>> one EPC ( say:'e2003411b802010994095761' i.e. 24char ) out of 5000 >>>> records. >>>> and select query take 2-3 sec. to give result output. >>>> >>>> By any means i can reduce this search time with EPC as search criteria. >>>> >>>> Regards >>>> >>> >>> Regards, >>> Simon >>> _______________________________________________ >>> sqlite-users mailing list >>> [email protected] >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >>> >> _______________________________________________ >> sqlite-users mailing list >> [email protected] >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> > > -- > View this message in context: > http://old.nabble.com/EPC-Based-Search-tp26791835p26810582.html > Sent from the SQLite mailing list archive at Nabble.com. > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

