Re: Join query on 1M row table slow

Поиск
Список
Период
Сортировка
От lists@natserv.com
Тема Re: Join query on 1M row table slow
Дата
Msg-id 20040210160505.E37664@zoraida.natserv.net
обсуждение исходный текст
Ответ на Join query on 1M row table slow  (CSN <cool_screen_name90001@yahoo.com>)
Ответы Re: Join query on 1M row table slow  (CSN <cool_screen_name90001@yahoo.com>)
Re: Join query on 1M row table slow  (CSN <cool_screen_name90001@yahoo.com>)
Список pgsql-general
On Tue, 10 Feb 2004, CSN wrote:

> I have a pretty simple select query that joins a table
> (p) with 125K rows with another table (pc) with almost
> one million rows:
>
> select p.*
> from product_categories pc
> inner join products p
> on pc.product_id = p.id
> where pc.category_id = $category_id
> order by p.title
> limit 25
> offset $offset
>
> The query usually takes about five seconds to execute
> (all other PG queries perform fast enough). I have
> indexes on everything needed, and EXPLAIN shows
> they're being used. Is there anything else I can do to
> improve performance - such as tweaking some settings
> in the config?
>
> Redhat 9, PG 7.4.1.

Could you give more info on the hardware?
You did not mention how often you do your vacuum analyze or how often data
is updated/deleted. The more info you provide the more we can try to
help.

How about your buffer and other settings?

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Duplicate oid and primary key values
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Join query on 1M row table slow