Bacula-users

Re: [Bacula-users] postgres tuning?

2010-06-07 16:02:38
Subject: Re: [Bacula-users] postgres tuning?
From: Julien <jcigar AT ulb.ac DOT be>
To: Martin Simmons <martin AT lispworks DOT com>
Date: Mon, 07 Jun 2010 21:26:58 +0200
On Mon, 2010-06-07 at 20:10 +0100, Martin Simmons wrote:
> >>>>> On Mon, 7 Jun 2010 18:24:34 +0200, Florian Heigl said:
> > 
> > Hi all,
> > 
> > > Within psql/mysql:
> > > 1) select count(*) from File;                    1sec    30min
> > 
> > Disclaimer: I don't know a dime's worth of databases per se. But I
> > spend a lot of time hunting other peoples performance issues. :)
> > 
> > I think you should start identifying the cause for this bit at the
> > very first, as it shows the absolutely worst perfomance and probably
> > what slows this also slows the rest.
> > My nose says this is really smelly and should'nt even take as long
> > without any indexes.
> 
> Is counting all rows ever fast on postgres?  For me, it runs a sequential
> scan, which is always slow.  It is probably never done with millions of rows
> in a real application, so noone has optimized it.
> 

It runs a sequential scan because of MVCC. Please see 
http://wiki.postgresql.org/wiki/Slow_Counting

I don't know MySQL very well, but I imagine that a count(*) on an InnoDB
database should be as slow

> __Martin
> 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users



------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>