On 9 Feb 2012, at 1:45pm, Valentin Davydov wrote: > CREATE TABLE T(X, Y, Z, ..., UNIQUE (X, Y, Z, ...) ON CONFLICT IGNORE); > CREATE INDEX IX ON T(X); > CREATE INDEX IY ON T(Y); > CREATE INDEX IZ ON T(Z); > ..... > > Data in the different columns are small positive integers, 32-bit integers > or few-bytes blobs. Neither of the X, Y, Z, ... are unique by themselves
Not an answer to your question, but it's worth knowing that those indexes may not be helping anything you're doing. SQLite already has to create an index idea for coping with your UNIQUE clause. So it already has an index on (X, Y, Z, ...) Creation of other indexes would be down to what other commands you expect to execute against the database. Each command is likely to use only one index. So for example an index on the Y column is unlikely to be ever used unless you do a search on Y without also searching on X. Try removing those indexes and see if this improves matters. It'll certainly make your filesize smaller. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users