Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] No: implied sort with group by

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: darrenk(at)insightdist(dot)com (Darren King)
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] No: implied sort with group by
Date: 1998-01-29 14:51:04
Message-ID: 199801291451.JAA10489@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
> > And in v6.1. If b is a space (rather than a NULL), then the behaviour is correct
> > so it must be a problem in grouping NULLs.
> > 
> 
> explain select b,c,sum(a) from foo group by b,c; -- gives...
> 
> Aggregate  (cost=0.00 size=0 width=0)
>   ->   Group  (cost=0.00 size=0 width=0)
>     ->     Sort  (cost=0.00 size=0 width=0)
>       ->       Seq Scan on foo  (cost=0.00 size=0 width=28)
> 
> There sort is there before the grouping operation, so this would seem to point to
> the sort code incorrectly setting something when handling NULLs.
> 
> This doesn't seem like the same bug that Vadim found since a small data set such as
> this one _shouldn't_ be going out to a tape file.

We have a NULL sort patch for psort in 6.3.  Are you running the most
recent sources?

-- 
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us

In response to

pgsql-hackers by date

Next:From: The Hermit HackerDate: 1998-01-29 14:52:27
Subject: Re: [HACKERS] postmaster crash and .s.pgsql file
Previous:From: Bruce MomjianDate: 1998-01-29 14:47:06
Subject: Re: [HACKERS] Profiling the backend (gprof output) [current devel]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group