I think the attach is the way to go, but no need to insert, just select from the attached databases. sqlite3 master.db (master is empty). attach a.db A attach b.db B attach c.db C Then : select <columns> from a.A, b.b, c.c where ....
Alberto Simões <[EMAIL PROTECTED]> wrote: Hi I am using SQLite to store ngrams from texts (bigrams, trigrams and tetragrams). This is not really important for the question; just imagine I have three tables A (int,int), B (int, int, int) and C (int, int, int, int). As the table keys are full rows and the tables get big, it is not quite efficient com compute bigrams, trigrams and tetragrams at the same time. Given that I have access to a cluster, I split the job in three tasks that can be computed separately on different cluster nodes. One calculates bigrams, another trigrams, and other to calculate tetragrams. So far, everything fine. The problem is that this results in three different files each with a table. I need to join tables in the same file. There are no dependencies between tables, thus you can imagine that I need something like: cat A.db B.db C.db > full.db # kidding I can do an export and import for each table. But I would like to know if there is any faster method. Thank you Kind regards, Alberto -- Alberto Simões ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------