Re: Re-Reason of Slowness of Query - Mailing list pgsql-performance

From Vitalii Tymchyshyn
Subject Re: Re-Reason of Slowness of Query
Date
Msg-id 4D89BCD6.6040604@gmail.com
Whole thread Raw
In response to Re-Reason of Slowness of Query  (Adarsh Sharma <adarsh.sharma@orkash.com>)
Responses Re: Re-Reason of Slowness of Query  (Adarsh Sharma <adarsh.sharma@orkash.com>)
List pgsql-performance
23.03.11 11:17, Adarsh Sharma написав(ла):

I think it is very much faster but I don't understand the query :

explain select distinct(b) from t1,t2 where t1.b >t2.d union all  select distinct(b) from t1,t2 where  t1.b <t2.d;

I don't understand it too. What are you trying to get? Is it
select distinct(b) from t1 where  b > (select min(d) from t2) or b  < (select max(d) from t2)
?

Can you explain in words, not SQL, what do you expect do retrieve?

Best regards, Vitalii Tymchyshyn

pgsql-performance by date:

Previous
From: Adarsh Sharma
Date:
Subject: Re-Reason of Slowness of Query
Next
From: Adarsh Sharma
Date:
Subject: Re: Re-Reason of Slowness of Query