> 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