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

Reply via email to