Re: Performance pb vs SQLServer. - Mailing list pgsql-performance

From Stéphane COEZ
Subject Re: Performance pb vs SQLServer.
Date
Msg-id 20050815090515.0D75E100008F@mwinf0703.wanadoo.fr
Whole thread Raw
In response to Re: Performance pb vs SQLServer.  (John Arbash Meinel <john@arbash-meinel.com>)
List 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
> >
> >
> >
>
>
>




pgsql-performance by date:

Previous
From: David Hodgkinson
Date:
Subject: Re: FW: Tx forecast improving harware capabilities.
Next
From: Stéphane COEZ
Date:
Subject: Re: Performance pb vs SQLServer.