Re: [PERFORM] iowait bug?

2009-03-22 Thread Laurent Wandrebeck
2009/3/21 M. Edward (Ed) Borasky zzn...@gmail.com: I just discovered this on a LinkedIn user group: http://bugzilla.kernel.org/show_bug.cgi?id=12309 Is anyone here seeing evidence of this in PostgreSQL?? I've been hit by an I/O wait problem, as described here:

Re: [PERFORM] iowait bug?

2009-03-22 Thread Laurent Laborde
On Sun, Mar 22, 2009 at 8:49 AM, Laurent Wandrebeck l.wandreb...@gmail.com wrote: 2009/3/21 M. Edward (Ed) Borasky zzn...@gmail.com: I just discovered this on a LinkedIn user group: http://bugzilla.kernel.org/show_bug.cgi?id=12309 Is anyone here seeing evidence of this in PostgreSQL?? I've

Re: [PERFORM] iowait bug?

2009-03-22 Thread Greg Smith
On Fri, 20 Mar 2009, M. Edward (Ed) Borasky wrote: I just discovered this on a LinkedIn user group: http://bugzilla.kernel.org/show_bug.cgi?id=12309 I would bet there's at least 3 different bugs in that one. That bug report got a lot of press via Slashdot a few months ago, and it's picked

Re: [PERFORM] iowait bug?

2009-03-22 Thread Laurent Wandrebeck
2009/3/22 Greg Smith gsm...@gregsmith.com: On Fri, 20 Mar 2009, M. Edward (Ed) Borasky wrote: I just discovered this on a LinkedIn user group: http://bugzilla.kernel.org/show_bug.cgi?id=12309 I would bet there's at least 3 different bugs in that one.  That bug report got a lot of press via

Re: [PERFORM] LIMIT confuses the planner

2009-03-22 Thread marcin mank
So the bottom line here is just that the estimated n_distinct is too low.  We've seen before that the equation we use tends to do that more often than not.  I doubt that consistently erring on the high side would be better though :-(.  Estimating n_distinct from a limited sample of the

Re: [PERFORM] LIMIT confuses the planner

2009-03-22 Thread marcin mank
I hit an interestinhg paper on n_distinct calculation: http://www.pittsburgh.intel-research.net/people/gibbons/papers/distinct-values-chapter.pdf the PCSA algorithm described there requires O(1) calculation per value. Page 22 describes what to do with updates streams. This I think

Re: [PERFORM] LIMIT confuses the planner

2009-03-22 Thread Tom Lane
marcin mank marcin.m...@gmail.com writes: I hit an interestinhg paper on n_distinct calculation: http://www.pittsburgh.intel-research.net/people/gibbons/papers/distinct-values-chapter.pdf I don't think we're quite ready to make ANALYZE read every row of a table in order to estimate n_distinct.

Re: [PERFORM] iowait bug?

2009-03-22 Thread Greg Smith
On Mon, 23 Mar 2009, Laurent Wandrebeck wrote: I thought about completely fair scheduler at first, but that one came in around 2.6.21. CFS showed up in 2.6.23. I think that forcing the system to write down more often, and smaller data just hides the problem, and doesn't correct it. That's