Re: [GENERAL] Compound keys and foreign constraints

2004-04-06 Thread Manfred Koizar
On Mon, 05 Apr 2004 11:55:17 -0500, Wes Palmer <[EMAIL PROTECTED]> wrote: >> match, there's no need to fetch the heap tuple. Unfortunately the >> planner doesn't believe that this is possible: >> /* Don't believe estimates less than 1... */ >> if (tuples_fetched < 1.0) >> tuples_fetched = 1.0; > >

Re: [GENERAL] Compound keys and foreign constraints

2004-04-06 Thread Wes Palmer
> Is there an index on message_recipients(Message_Key)? Yes. > How many rows satisfy > > SELECT * FROM messages WHERE Message_Date BETWEEN ... AND ... ? db=> select count(*) from messages where message_date between '29-Mar-04' and '31-Mar-04 23:59:59'; count 737873 (1 row) Other c

Re: [GENERAL] Compound keys and foreign constraints

2004-04-02 Thread Alvaro Herrera
On Fri, Apr 02, 2004 at 11:08:21AM -0600, [EMAIL PROTECTED] wrote: > db=> explain analyze select count(*) from messages m, message_recipients r, > addresses a WHERE r.Message_Key=m.Message_Key AND > a.Address='[EMAIL PROTECTED]' AND a.Address_Key=r.Recipient AND ( > (m.Message_Date >= '29-MAR-04')

Re: [GENERAL] Compound keys and foreign constraints

2004-04-02 Thread wespvp
On 4/1/04 6:00 PM, "Manfred Koizar" <[EMAIL PROTECTED]> wrote: > And what are your settings for random_page_cost, effective_cache_size, > and sort_mem? I didn't read close enough last time. Random_page_cosst, cpu_tuple_cost, cpu_index_tuple_cost, and cpu_operator_cosst are all at default. Effect