Hi all ,
I need to insert 500 records (each record has 12 bytes) to a table and it
takes me approximately 2 seconds.
Is there a way to improve my code so it can do it faster?
Thanks in advance,
Marco.
Here is my code:
query = sqlite3_mprintf("Insert into Inventory (Tag)
uot; <[EMAIL PROTECTED]> wrote:
Executing BEGIN TRANSACTION before and END TRANSACTION after the full
insert will greatly improve
Your performance.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent Vega
Sent: Sunday, March 09, 2008 12:44 PM
Hi all ,
I am trying to insert about 500 records to a table.
I have tested my code and it works fine (All 500 recoreds are put in the table
in about 250 miliseconds) but from time time I get SQLITE_CONSTRAINT error code
after the sqlite3_step (1 out of 7 times).
Any idea on how to prevent this ?
t: Re: [sqlite] SQLITE_CONSTRAINT error after sqlite3_step
On Fri, Mar 14, 2008 at 04:09:50PM -0700, Vincent Vega scratched on the wall:
> for (i=1;500;i ++)
> {
I can't say about your CONSTRAINT problem, but that's an infinite loop.
And 1? Seriously?
Without a full descript
8 4:27:11 PM
Subject: Re: [sqlite] SQLITE_CONSTRAINT error after sqlite3_step
Vincent Vega wrote:
> Anyhow, as I said before the code works fine most of the times(I can
> insert 500 records to the table and read them correctly) but from time
> to time I get SQLITE_CONSTRAINT error code after th
e Database <sqlite-users@sqlite.org>
Sent: Monday, March 17, 2008 11:10:35 PM
Subject: Re: [sqlite] SQLITE_CONSTRAINT error after sqlite3_step
Vincent Vega wrote:
> Thanks a lot . Your explantion does make sence.
> I'll remove the UNIQUE index and see if it helps.
>
You probably
at sqlite3_prepare_v2() by calling
sqlite3_finalize() .
- Original Message
From: Dennis Cote <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Wednesday, March 19, 2008 12:06:04 AM
Subject: Re: [sqlite] SQLITE_CONSTRAINT error after sqlite3_step
7 matches
Mail list logo