Re: experiments in query optimization

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: experiments in query optimization
Дата
Msg-id 603c8f071003291102g778afc2fvda0fc281454526c9@mail.gmail.com
обсуждение исходный текст
Ответ на experiments in query optimization  (Faheem Mitha <faheem@email.unc.edu>)
Ответы Re: experiments in query optimization  (Faheem Mitha <faheem@email.unc.edu>)
Список pgsql-performance
On Thu, Mar 25, 2010 at 3:57 PM, Faheem Mitha <faheem@email.unc.edu> wrote:
>
> Hi everyone,
>
> I've been trying to reduce both memory usage and runtime for a query.
> Comments/suggestions gratefully received. Details are at
>
> http://bulldog.duhs.duke.edu/~faheem/snppy/opt.pdf
>
> See particularly Section 1 - Background and Discussion.
>
> If you want a text version, see
>
> http://bulldog.duhs.duke.edu/~faheem/snppy/opt.tex
>
> For background see
>
> http://bulldog.duhs.duke.edu/~faheem/snppy/diag.pdf (text version
> http://bulldog.duhs.duke.edu/~faheem/snppy/diag.tex) and
> http://bulldog.duhs.duke.edu/~faheem/snppy/snppy.pdf
>
> Please CC any replies to me at the above email address. Thanks.

Didn't you (or someone) post about these queries before?

It's not really too clear to me from reading this what specific
questions you're trying to answer.  One random thought: WHERE
row_number() = 1 is not too efficient.  Try using LIMIT or DISTINCT ON
instead.

If you're concerned about memory usage, try reducing work_mem; you've
probably got it set to something huge.

You might need to create some indices, too.

...Robert

В списке pgsql-performance по дате отправления:

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: Performance regarding LIKE searches
Следующее
От: Faheem Mitha
Дата:
Сообщение: Re: experiments in query optimization