[SQL] subselect query time and loops problem

2005-04-09 Thread pankaj naug
hi,   I am using this query.   SELECT * FROM guild_properties_buy WHERE agent IN (SELECT agent_id FROM guild_agents WHERE   address_region = 'midlands'  AND  active='on' AND status=0) AND   country = 'United Kingdom' AND   active='on' AND status='0' ORDER BY price DESC LIMIT 10 OFFSET 0   when i r

Re: [SQL] subselect query time and loops problem

2005-04-09 Thread Tom Lane
pankaj naug <[EMAIL PROTECTED]> writes: > Both servers have same version with same postgresql.conf. But the time taken > by both the servers with subselect are way different. the loops and the query > time are completely different. both servers have same indexes. Evidently one has been analyzed

Re: [SQL] subselect query time and loops problem

2005-04-10 Thread pankaj naug
Thanks Tom,   I am using version 7.3.4, having problems updating to postgres 8 because of cpanel problems.   regarding,   >Evidently one has been analyzed much more recently than the other,because the estimated row counts are wildly different.   Both the explain/analyse queries has been run at the

Re: [SQL] subselect query time and loops problem

2005-04-10 Thread Ragnar Hafstað
On Sun, 2005-04-10 at 07:54 -0700, pankaj naug wrote: > [quoting Tom] > >Evidently one has been analyzed much more recently than the other, > because the estimated row counts are wildly different. > > Both the explain/analyse queries has been run at the same time. in that case, is the data the