I'm having an issue where inserts on an un-cached database are very slow. The reason probably is that a large part of the existing index needs to be read from disk, to be able to insert new rows to the index. The length of the values in the indexed column are around 60 bytes, so I'm thinking about adding an extra column, containing a shorter hash (64bits) of the actual value, and move the index to that column instead. This way the total size of the index (and the database) will be much smaller, hopefully resulting in faster inserts.
But I'm wondering if SQLite can deal more efficiently with a INTEGER index (64bits) VS an 8-byte TEXT column (also 64bits). I know the INTEGERs require less disk-space because SQLite can store smaller values in fewer bytes, but are there any other differences that make them more preferable as an INDEX? If there is no difference in performance, I could just take the first 8 characters of the TEXT column as a hash-value, instead of calculating a CRC64 each time. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users