On Mon, Mar 09, 1998 at 10:27:19PM +0100, Maarten Boekhold wrote:
> > > Uh, maybe a stupid question, but did you do a 'vacuum'?
> >
> > Uh, yeah. Several of them, thinking that perhaps the indices were out of
> > date or otherwise damaged. Then, after some period of time where queries
> > and updates were being put against the table, it started working properly (!)
> >
> > I have *absolutely* no idea what could have changed - I made no alterations,
> > didn't shut the server down, nothing - between the time that it was last
> > returning the wrong "explain" output and when it started returning the
> > correct output.
>
> Maybe the tables grew so that the optimizer decided now was to time where
> using indices would be faster? Just trying to make some sense out of this...
>
> Maarten
I don't think so. We do a lot of replaces on these tables (a shitload of
them in fact) but very few inserts. Vacuum typically finds about the same
number of entries have been replaced as there are in the table to begin with
(ie: the update rate is roughly 1:1 for the number of tuples in the
database, or perhaps even a bit higher).
And, we run vacuum across the database every night through cron.
--
--
Karl Denninger (karl@MCS.Net)| MCSNet - Serving Chicagoland and Wisconsin
http://www.mcs.net/ | T1's from $600 monthly to FULL DS-3 Service
| NEW! K56Flex support on ALL modems
Voice: [+1 312 803-MCS1 x219]| EXCLUSIVE NEW FEATURE ON ALL PERSONAL ACCOUNTS
Fax: [+1 312 803-4929] | *SPAMBLOCK* Technology now included at no cost