pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vitalii Tymchyshyn <tivv00@gmail.com>
To: Adarsh Sharma <adarsh.sharma@orkash.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Re-Reason of Slowness of Query
Date: Wed, 23 Mar 2011 11:26:46 +0200
Message-ID: <4D89BCD6.6040604@gmail.com> (raw)
In-Reply-To: <4D89BABF.4080806@orkash.com>
References: <4D89BABF.4080806@orkash.com>

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

view thread (19+ messages)  latest in thread

Message-ID: <4D89BCD6.6040604@gmail.com>
Permalink:  ../4D89BCD6.6040604@gmail.com/
Also on:    postgresql.org/message-id/4D89BCD6.6040604@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tivv00@gmail.com, adarsh.sharma@orkash.com
  Subject: Re: Re-Reason of Slowness of Query
  In-Reply-To: <4D89BCD6.6040604@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox