Re: Performance pb vs SQLServer.

From: Stéphane COEZ <scoez(at)harrysoftware(dot)com>
To: "'John Arbash Meinel'" <john(at)arbash-meinel(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance pb vs SQLServer.
Date: 2005-08-15 09:05:11
Message-ID: 20050815090515.0D75E100008F@mwinf0703.wanadoo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

John Arbash Meinel wrote :
>
> You might also try a different query, something like:
>
> SELECT DISTINCT cod FROM mytable ORDER BY cod GROUP BY cod;
> (You may or may not want order by, or group by, try the different
> combinations.)
> It might be possible to have the planner realize that all you
> want is unique rows, just doing a group by doesn't give you that.
>
> John
> =:->
>
Thanks John, but using SELECT DISTINCT with or without Order nor Group by is
worth...
30 sec (with index) - stopped at 200 sec without index...

So Hash Aggregate is much better than index scan ...

> >
> >Thanks for help.
> >
> >Stéphane COEZ
> >
> >
> >
> >
> >---------------------------(end of
> >broadcast)---------------------------
> >TIP 9: In versions below 8.0, the planner will ignore your desire to
> > choose an index scan if your joining column's datatypes do not
> > match
> >
> >
> >
>
>
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Stéphane COEZ 2005-08-15 09:08:06 Re: Performance pb vs SQLServer.
Previous Message Magnus Hagander 2005-08-15 08:25:47 Re: Performance pb vs SQLServer.