Am 12.03.2012 12:40, schrieb Kit:
2012/3/12, Christoph P.U. Kukulies<k...@kukulies.org>:
INSERT OR IGNORE INTO resource ...
INSERT OR REPLACE INTO instance ...
Thanks a lot. What is the idea behind the INSERT OR REPLACE in your
solution?
Christoph
If you edit a test for some version of your software, md5sum is
changed too. You must replace row in `instance`.
Thanks. I have the structure now in a shape I think it would be useful:

CREATE TABLE instance (
       mandant TEXT ,
       md5sum TEXT,
       basename TEXT,
       prob_ref TEXT,
       suite TEXT ,
       tag TEXT ,
       size INT,
       creation_date TEXT,
      last_write_time TEXT,
     PRIMARY KEY (mandant,basename,prob_ref,suite,tag)
 );

CREATE TABLE resource ( md5sum TEXT PRIMARY KEY, data BLOB);

The FS tree contained about a million files and a corresponding tar-archive comprises about 70 GB.
The database with gzipped BLOBS now is 1.7GB in size.

Each files' location is made of \mandant\prob_ref\tag\suite\basename.

My only question now is:

when I collect the files and INSERT or IGNORE the resource, I have to read in the file and build the BLOB, independently on whether the INSERT really has to take place. A quick beforehand decision whether an INSERT has to be made, could possibly speed up the file collection process.

I was using a try clause on the INSERT and if that wouldn't fail I was doing an UPDATE on just the BLOB.

Other ideas?

--
Christoph



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to