Re: Performance pb vs SQLServer.

From: Magnus Hagander
Subject: Re: Performance pb vs SQLServer.
Date: ,
Msg-id: 6BCB9D8A16AC4241919521715F4D8BCE6C789B@algol.sollentuna.se
(view: Whole thread, Raw)
In response to: Performance pb vs SQLServer.  (Stéphane COEZ)
Responses: Re: Performance pb vs SQLServer.  (Stéphane COEZ)
List: pgsql-performance

Tree view

Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  (John Arbash Meinel, )
  Re: Performance pb vs SQLServer.  ("Steinar H. Gunderson", )
   Re: Performance pb vs SQLServer.  (John Arbash Meinel, )
   Re: Performance pb vs SQLServer.  (Tom Lane, )
    Re: Performance pb vs SQLServer.  ("Steinar H. Gunderson", )
  Re: Performance pb vs SQLServer.  ("Steinar H. Gunderson", )
  Re: Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  (, )
  Re: Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  ("Magnus Hagander", )
  Re: Performance pb vs SQLServer.  (Stéphane COEZ, )
 Re: Performance pb vs SQLServer.  ("Magnus Hagander", )
  Re: Performance pb vs SQLServer.  (Alvaro Herrera <-ip.org>, )
  Re: Performance pb vs SQLServer.  ("Qingqing Zhou", )
   Re: Performance pb vs SQLServer.  (John A Meinel, )

> Hi,
>
> I have a perfomance issue :
>
> I run PG (8.0.3) and SQLServer2000 on a Windows2000 Server
> (P4 1,5Ghz 512Mo) I have a table (3200000 rows) and I run
> this single query :
>
> select cod from mytable group by cod
> I have an index on cod (char(4) - 88 different values)
>
> PG = ~ 20 sec.
> SQLServer = < 8 sec
>
>
> the explain is :
>
> HashAggregate  (cost=64410.09..64410.09 rows=55 width=8)
>   ->  Seq Scan on mytable  (cost=0.00..56325.27 rows=3233927 width=8)
>
>
> if I switch to "enable_hashagg = false" (just for a try...)
> the planner will choose my index :
>
> Group  (cost=0.00..76514.01 rows=55 width=8)
>   ->  Index Scan using myindex on mytable
> (cost=0.00..68429.20 rows=3233927
> width=8)
>
> but performance will be comparable to previous test.
>
> So with or without using Index I have the same result.

Out of curiosity, what plan do you get from SQLServer? I bet it's a clustered index scan...


//Magnus


pgsql-performance by date:

From: "Magnus Hagander"
Date:
Subject: Re: Performance pb vs SQLServer.
From: Manfred Koizar
Date:
Subject: Re: Odd Locking Problem