Re: [sqlite] Speed of DROP INDEX

2009-03-18 Thread Griggs, Donald
Re: [sqlite] Speed of DROP INDEX This may not be useful to your situation, but my (not terribly informed) *guess* is that the reason it takes so long is that the index pages are spread throughout your 8-millon row database. If by chance it's feasible to either: -- Not create the index until

Re: [sqlite] Speed of DROP INDEX

2009-03-18 Thread Nikolas Stevenson-Molnar
The journal grew to about the same size as well, so it seemed it was getting use. I'll try journal_mode off and see if that has any effect. Thanks! _Nik On Mar 18, 2009, at 9:54 AM, Jim Wilcoxson wrote: > Hmm... Maybe it is creating the journal but not really using it with > synchronous=off.

Re: [sqlite] Speed of DROP INDEX

2009-03-18 Thread Jim Wilcoxson
Hmm... Maybe it is creating the journal but not really using it with synchronous=off. You might try pragma journal_mode = off. That might keep it from creating a journal, but if you already tried using synchronous=off, my guess is journal_mode=off won't run any faster. Jim On 3/18/09, Nikolas

Re: [sqlite] Speed of DROP INDEX

2009-03-18 Thread Nikolas Stevenson-Molnar
I'm not sure what you mean...? _Nik On Mar 18, 2009, at 2:23 AM, pi song wrote: > Would not that be more efficient to do it in batch? Like an entry in > transaction means a block of deletions? If there is a crash during > dropping operation then the journal can be looked up and replayed. > > Pi

Re: [sqlite] Speed of DROP INDEX

2009-03-18 Thread Nikolas Stevenson-Molnar
I've actually been running it with synchronous=off. Unfortunately, it doesn't seem to run any faster and still creates a journal file. _Nik On Mar 17, 2009, at 6:05 PM, Jim Wilcoxson wrote: > Drop is executed within a transaction, which means that every record > you touch has to be backed up

Re: [sqlite] Speed of DROP INDEX

2009-03-18 Thread pi song
Would not that be more efficient to do it in batch? Like an entry in transaction means a block of deletions? If there is a crash during dropping operation then the journal can be looked up and replayed. Pi Song On Wed, Mar 18, 2009 at 12:05 PM, Jim Wilcoxson wrote: > Drop is

Re: [sqlite] Speed of DROP INDEX

2009-03-17 Thread Jim Wilcoxson
Drop is executed within a transaction, which means that every record you touch has to be backed up to the journal first, then modified in the database. I'm guessing that if you use pragma synchronous=off, it would speed up the drop index, but you'd take a chance on corrupting the database if the

[sqlite] Speed of DROP INDEX

2009-03-17 Thread Nikolas Stevenson-Molnar
Hi, I'm trying to drop an index on a table with about 8 million rows and it's taking a very long time. I can understand why building the index would take some time, but why dropping it? And is there any way to speed it up? Thanks! _Nik ___