Re: Major differences between oracle and postgres performance - what can I do ?

От: Tom Lane
Тема: Re: Major differences between oracle and postgres performance - what can I do ?
Дата: ,
Msg-id: 25464.1087591637@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Major differences between oracle and postgres performance - what can I do ?  (Gary Cowell)
Ответы: Re: Major differences between oracle and postgres performance - what can I do ?  (Gary Cowell)
Список: pgsql-performance

Скрыть дерево обсуждения

Major differences between oracle and postgres performance - what can I do ?  (Gary Cowell, )
 Re: Major differences between oracle and postgres performance  (Richard Huxton, )
 Re: Major differences between oracle and postgres performance - what can I do ?  (Paul Thomas, )
 Re: Major differences between oracle and postgres performance - what can I do ?  (Jeff, )
 Re: Major differences between oracle and postgres performance  (Shridhar Daithankar, )
 Re: Major differences between oracle and postgres performance - what can I do ?  (Gary Cowell, )
  Re: Major differences between oracle and postgres performance  (pginfo, )
  Re: Major differences between oracle and postgres performance  (Richard Huxton, )
  Re: Major differences between oracle and postgres performance - what can I do ?  (Tom Lane, )
   Re: Major differences between oracle and postgres performance - what can I do ?  (Stephen Frost, )
    Re: Major differences between oracle and postgres performance - what can I do ?  (Tom Lane, )
     Re: Major differences between oracle and postgres performance - what can I do ?  (Stephen Frost, )
      Re: Major differences between oracle and postgres performance - what can I do ?  (Stephen Frost, )
  Re: Major differences between oracle and postgres performance  (pginfo, )
  Re: Major differences between oracle and postgres performance - what can I do ?  ("Mischa Sandberg", )
 Re: Major differences between oracle and postgres performance - what can I do ?  (Gary Cowell, )
  Re: Major differences between oracle and postgres performance - what can I do ?  (Tom Lane, )
   Re: Major differences between oracle and postgres performance - what can I do ?  (Gary Cowell, )

=?iso-8859-1?q?Gary=20Cowell?= <> writes:
> So it seems the idea that oracle is dropping duplicate
> rows prior to the sort when using distinct may indeed
> be the case.

Okay.  We won't have any short-term solution for making DISTINCT do that,
but if you are on PG 7.4 you could get the same effect from using
GROUP BY: instead of
    select distinct version from vers where version is not null
try
    select version from vers where version is not null group by version
You should get a HashAggregate plan out of that, and I'd think it'd be
pretty quick when there are not many distinct values of version.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Gary Cowell
Дата:
Сообщение: Re: Major differences between oracle and postgres performance - what can I do ?
От: "Janio Rosa da Silva"
Дата:
Сообщение: Hi!