- Original Message -
From: "Christian Smith" <[EMAIL PROTECTED]>
To: "Christian Smith" ; "Yuriy" <[EMAIL PROTECTED]>
Sent: Monday, June 20, 2005 12:01 PM
Subject: Re[2]: [sqlite] Sqlite low level and Speed.
> On Mon, 20 Jun 2005, Yuriy wro
On Mon, 20 Jun 2005, Yuriy wrote:
>CS> When creating testtable, specify val as unique, and specify what to do
>CS> with conflicts:
>CS> CREATE TABLE testtable(val TEXT UNIQUE ON CONFLICT REPLACE);
>CS> The conflict clauses are documented here:
>CS> http://www.sqlite.org/lang_conflict.html
>Try it
CS> When creating testtable, specify val as unique, and specify what to do
CS> with conflicts:
CS> CREATE TABLE testtable(val TEXT UNIQUE ON CONFLICT REPLACE);
CS> The conflict clauses are documented here:
CS> http://www.sqlite.org/lang_conflict.html
Try it for ~1,000,000 UNIQUE records very slow :
BV> use transactions, speeds up a lot
Sorry transaction i also use speed low :(
begin
c:=0;
for i:=1 to 1000 do
begin
select * from testable where val=StringN
if val NOT Exist insert into testtable
inc(c);
if c=1 then
begin
Commit;
Begin;
c:=0;
end;
end
4 matches
Mail list logo