Re: [SQL] Query becoming slower on adding a primary key [ SOLVED

2004-06-10 Thread Rajesh Kumar Mallah
HI, The problem was solved by reducing the effective_cache_size from 102400 to 10240 my total RAM is 4GB. Regds mallah. Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) j

Re: [SQL] Query becoming slower on adding a primary key

2004-06-08 Thread Rajesh Kumar Mallah
Hi, Is there any solution to this issue ? I am facing it every week. Warm Regds Mallah. Rajesh Kumar Mallah wrote: Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) join email_subscriptions

Re: [SQL] Query becoming slower on adding a primary key

2004-06-02 Thread Rajesh Kumar Mallah
Even the first query used to run fine before but one fine day it changed plans i think. Regds Mallah. Rajesh Kumar Mallah wrote: Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) join email

Re: [SQL] Query becoming slower on adding a primary key

2004-06-02 Thread Rajesh Kumar Mallah
Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) join email_subscriptions h using(email_id) where 1=1 and f.source_id =1 and h.sub_id = 3 ; Runs for Eve

Re: [SQL] Query becoming slower on adding a primary key

2004-06-01 Thread Tom Lane
[EMAIL PROTECTED] writes: > tradein_clients=# explain analyze select email_id ,email ,contact from > t_a a join email_source f using(email_id) join email_subscriptions h > using(email_id) where 1=1 and f.source_id =1 and h.sub_id = 3 ; > Runs for Ever. So what does plain explain say about it?

[SQL] Query becoming slower on adding a primary key

2004-06-01 Thread mallah
Hi , After adding a primary key in one of the participant tables the query never finishes. The live table has a primary key so it cannot be removed. I made a copy of the live table using create table t_a as select * from tab. the query works fine . when i ad the pkey like i have in the live tabl