Since you produce the statistics once per month on a schedule it would be more efficient to not have an index. The index will slow down daily operations each time a record is inserted. Copy the database file once per month to a 'snapshot' file. Add the index to the snapshot database and then produce your statistics. Make it a scheduled task that runs the night before you need it.
On 4/15/05, msaka msaka <[EMAIL PROTECTED]> wrote: > have you some feeling on my problem? > > cut or not cut db files? > > >-----Pôvodná správa----- > >Od: D. Richard Hipp [mailto:[EMAIL PROTECTED] > >Odoslané: 15. apríla 2005 11:15 > >Komu: sqlite-users@sqlite.org > >Predmet: Re: [sqlite] optimize table > > > > > >On Fri, 2005-04-15 at 06:15 -0400, Ken & Deb Allen wrote: > >> I cannot speak for SQLITE for certain, but I know with a number of > >> commercial RDBMS packages the index is not used unless it contains a > >> sufficient degree of distribution. > >> > > > >SQLite does not do this. It makes no effort to keep track of the > >"degree of distribution" or other statistics associated with indices. > >It just uses them if they are available. > > > >This can be either a feature or a bug, depending on your point > >of view. I have had people tell me that they prefer the SQLite > >way. With other databases, they tell me, they are constantly > >in a struggle trying to outwit and trick the database engine > >into doing what they want. SQLite just does what you tell it > >to do, for better or for worse. > >-- > >D. Richard Hipp <[EMAIL PROTECTED]> > > -- --- You a Gamer? If you're near Kansas City: Conquest 36 https://events.reddawn.net The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's Call http://www.lulu.com/content/77264