Re: Compound keys and foreign constraints

Поиск
Список
Период
Сортировка
От Manfred Koizar
Тема Re: Compound keys and foreign constraints
Дата
Msg-id vt9p6017tr5tfc09g1od031nbej0iibufp@email.aon.at
обсуждение исходный текст
Ответ на Re: Compound keys and foreign constraints  (<wespvp@SYNTEGRA.COM>)
Ответы Re: Compound keys and foreign constraints  (<wespvp@syntegra.com>)
Re: Compound keys and foreign constraints  (Wes Palmer <Wesley.R.Palmer@SYNTEGRA.COM>)
Список pgsql-general
On Thu, 01 Apr 2004 16:45:23 -0600, <wespvp@SYNTEGRA.COM> wrote:
>db=> explain analyze select count(*) from messages m join (select * from
>db(> message_recipients r join addresses a on a.Address_Key=r.Recipient
>where
>db(> a.Address='lra.edi@edi.cma-cgm.com') as foo on
>db-> (m.Message_Key=foo.Message_Key AND (m.Message_Date >= '29-MAR-04') AND
>db(> (m.Message_Date <= '31-MAR-04 23:59:59'::timestamp without time zone));

I wonder whether we should try to talk the planner into using a hash or
merge join, but I fear I don't know enough yet.

Is there an index on message_recipients(Message_Key)?

How many rows satisfy

    SELECT * FROM messages WHERE Message_Date BETWEEN ... AND ... ?

And what are your settings for random_page_cost, effective_cache_size,
and sort_mem?

Servus
 Manfred

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

Предыдущее
От:
Дата:
Сообщение: Re: Compound keys and foreign constraints
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Some Aberdeen report