Re: Possible to improve query plan?
От | Mladen Gogala |
---|---|
Тема | Re: Possible to improve query plan? |
Дата | |
Msg-id | 4D34BE7D.3070007@vmsinfo.com обсуждение исходный текст |
Ответ на | Re: Possible to improve query plan? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-performance |
Tom Lane wrote: > If I'm not mistaken, that's a DB2-ish locution It could also be a part of the Oracle vernacular. I've seen queries like that running against Oracle RDBMS, too. > for a query with DISTINCT > ON, ie, you're looking for the row with highest _revision_created for > each value of id. It might perform well on DB2, but it's going to > mostly suck on Postgres --- we don't optimize window-function queries > very much at all at the moment. Hmmm, what optimizations do you have in mind? I thought that window functions are just clever tricks with memory? Anything that can be expected for 9.0x? > Try writing it with DISTINCT ON instead > of a window function, like so: > Wouldn't "distinct" necessarily bring about the sort/merge? -- Mladen Gogala Sr. Oracle DBA 1500 Broadway New York, NY 10036 (212) 329-5251 http://www.vmsinfo.com The Leader in Integrated Media Intelligence Solutions
В списке pgsql-performance по дате отправления: