2011/10/25 Bo Peng <ben....@gmail.com>:
> Tables are added in batch and then kept unchanged. I mean, a database
> might have 1000 new tables one day, and 2000 later. All operations are
> on single tables.
>
> Each table is for one 'sample'. All tables have one column for 'item
> id', and optional (zero - perhaps 6) columns for item attributes,
> which can be INT or FLOAT.

Is your 'id' type INTEGER PRIMARY KEY?
Each table in SQLite have a hidden key 'rowid INTEGER PRIMARY KEY'.
You may merge it with 'id'.

> There is no index and no key because I was concerned about insertion
> performance and size of database. My understanding is that index or
> key would not help simple aggregation operations because all records
> will be iterated sequentially.

If you do not need indexes, you can use a simpler solution: CSV.
One sample (now a table) -> one CSV file. Searching will be faster.

> I am running SELECT COUNT(*), MAX(QT) FROM TABLE_XX; etc as long as
> the WHERE clause is the same.

You can create additional indexes after inserting data into a table.
To search for maximum serve well.

If the content of tables also constant, it is possible after a
creating to generate
the aggregated values? For additional search would only use this summary data.
-- 
Kit
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to