Re: [sqlite] Requirements for index-aware INSERT SELECT

2009-12-30 Thread Pavel Ivanov
> INSERT OR IGNORE INTO Table (Field) SELECT SomeOtherField FROM OtherTable > ORDER BY SomeOtherField > > produced significant reduce in data flow. (Field Is indexed in Table). I > don't think the difference is related to some caching since the variant > without ORDER BY shows 50 MB data transfer f

[sqlite] Requirements for index-aware INSERT SELECT

2009-12-29 Thread Max Vlasov
The code I use can calculate data flow for sql queries (summing xRead iAmt in VFS) and I noticed that many variations of INSERT SELECT led to very big data flow (multiplication of the db size). I thought that such queries can be optimized if both tables are indexed accordingly and finally the follo