Re: [viewvc-dev] Bug in purge in db admin scripts

"Larry Shatzer, Jr." <[email protected]> Wed, 23 Jul 2008 13:15:10 -0600
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Message-ID <3fb3af800807231215k5316c675i251faf54b7a2bc4__25595.3955733732$1216840642$gmane$org@mail.gmail.com>
On Tue, Jul 8, 2008 at 9:23 AM, Larry Shatzer, Jr. <[email protected]> wrote:

> [...]
> My only problem now is this is SLOW. What used to take a minute or two is
> now taking HOURS. I'm not sure the best approach. The problem I think is
> partly the where clause (with its sub query to enforce a "foreign key") and
> that this delete statement is getting called a bunch of times. If any
> database gurus want to step in and code review this, I would be
> appreciative.
>
> I'm working on a few tweaks to this, here is a potential patch below. The
> checkins.descid still needs an index (included in updated make-database),
> and I'm looking at where other indexes might be useful. I don't think us
> adding additional indexes will be too much of a hassle, since the underlying
> schema is the same. We can try to get this index rolled into the default
> Bonsai for future versions as well. The only problem would be to have an
> "upgrade" script, or if we have local modifications (while still maintaining
> compatability with Bonsai) would be in a seperate script of some sort, or
> created some otherway (automaticly?).
> [...]


Any thoughts on this? I hate having to add an index, but at least it will
not interfere with Bonsai (as far as I can tell). The only issue will be
people upgrading to the new version of ViewVC which will have to add an
index by hand, or somehow it magically gets applied.

-- Larry