Paul Sanderson wrote
> So from yor main loop, expanding the following code may help us
> understand.
>
> "insert all downloaded rows"
The code schema is as follows:
foreach table
{
BEGIN
INSERT INTO table VALUES(....)
INSERT INTO table VALUES(....)
...
COMMIT
}
Large column values are supplied as parameters, the rest (vast majority) is
passed through SQL command.
Paul Sanderson wrote
> If your inserted records is 5million separate insertions
What alternative would you suggest?
Paul Sanderson wrote
> What is the schema for this table and what indexes are on it?
This is the first table where I noticed the problem:
CREATE TABLE [discounttype]
(
[createdon] DATETIME NULL,
[description] NTEXT NULL,
[discounttypeid] UNIQUEIDENTIFIER NOT NULL CONSTRAINT
PK_discounttype
PRIMARY KEY ROWGUIDCOL DEFAULT (newid()),
[isamounttype] BIT NOT NULL DEFAULT(0),
[modifiedon] DATETIME NULL,
[name] NVARCHAR(200) NULL COLLATE NOCASE
);
CREATE INDEX [FK_discounttype_name] ON [discounttype](name COLLATE NOCASE);
We use custom NOCASE collation.
Also, we use encrypted database. This slows down normal DB operations by a
few percent.
--
View this message in context:
http://sqlite.1065341.n5.nabble.com/Huge-WAL-log-tp79991p80044.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