Skip site navigation (1) Skip section navigation (2)

Subselect question

From: "Giovanni Floridia" <gfloridia(at)provider(dot)com(dot)br>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Subselect question
Date: 1998-12-29 15:23:25
Message-ID: 199812291734.PAA16884@jupiter.provider.com.br (view raw or flat)
Thread:
Lists: pgsql-general
Hi,

I have some trouble with subselects. (Version 6.3).

If I try 

Select name, address from costumers where cod_costumer  in (
Select cod_costumer from logins where total_usage > 0);

It take lots of time (really I din't wait till the end). 

But if I manualy split in 
Select cod_costumer from logins where total_usage > 0;
getting  
( 1,  9, 15, 18 , 40) 
and then use
Select name, address from costumers where cod_costumer  in ( 1,  9, 
15, 18 , 40);

All is OK. 

Is this type of subselect suported ? 

Thanks
 Giovanni Floridia

In response to

pgsql-general by date

Next:From: Ken MortDate: 1998-12-29 15:34:39
Subject: Re: [GENERAL] Problem with \copy
Previous:From: Thomas G. LockhartDate: 1998-12-29 15:08:10
Subject: Stale porting list?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group