On 1/5/16, Andrew Stewart <AStewart at arguscontrols.com> wrote:
> Hi,
>                 I am getting the following error on a database.  The
> database is 78GB large when this started.  I am adding data to it via insert
> statements.  I believe that this is the second time that I have seen this.
> It has been running for about 2 weeks adding data to it constantly.  The
> database structure is simple.  Following is the code for the create table:
> CREATE TABLE dataStreamRecord (
> fwParameterID INTEGER NOT NULL,
> dateTime INTEGER NOT NULL,
> data INTEGER NOT NULL,
> UNIQUE (
> fwParameterID,
> dateTime
> )
> );

FWIW, a more efficient schema might be:

    CREATE TABLE dataStreamRecord (
       fwParameterId INT,
       dateTime INT,
       data INT NOT NULL,
       PRIMARY KEY(fwParameterId,dateTime)
   ) WITHOUT ROWID;



>                 I am wondering what could cause this.  The database does
> have the compression attribute turned on.  The database time/date is still
> getting adjusted.

"compression attribute"?  SQLite doesn't have any such thing.  Is this
a feature of your filesystem?

Have you run "PRAGMA quick_check" on the faulty database to gather
more information about the problem?

Have you enabled error logging as described at
(https://www.sqlite.org/errlog.html)?

-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to