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

Re: Which of the solution is better?

From: Wei Weng <wweng(at)kencast(dot)com>
To: PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Which of the solution is better?
Date: 2002-12-11 16:26:20
Message-ID: 1039623980.17037.3.camel@Monet (view raw or flat)
Thread:
Lists: pgsql-performance
I don't think there is any. It is just another way to write an outer
join.

On Wed, 2002-12-11 at 00:46, Ron Johnson wrote:
> On Tue, 2002-12-10 at 23:20, Wei Weng wrote:
> > I have two tables A and B where A is a huge table with thousands of rows, B 
> > is a small table with only a couple of entries.
> > 
> > I want to do something like
> > 
> > SELECT
> > 	A.ID
> > 	A.Name
> > FROM
> > 	A JOIN B ON (A.ID = B.ID)
> 
> How is this query any different from:
> SELECT
> 	A.ID,
> 	A.Name
> FROM
> 	A,
> 	B
> WHERE 
> 	A.ID = B.ID
> 
> > And on the other hand I can have something like this
> > 
> > SELECT
> > 	A.ID
> > 	A.Name
> > FROM
> > 	A
> > WHERE
> > 	A.ID IN (B_Id_List)
> > 
> > B_Id_List is a string concatenation of B.ID. (ie, 1,2,3,4,5 ...)
> > 
> > Which one is faster, more efficient?
> > 
> > And if you could, which one is faster/more efficient under MS SQL Server 7? 
> > I am trying to develop a cross platform query, that is why I need to 
> > concern with performance under different databases.
-- 
Wei Weng
Network Software Engineer
KenCast Inc.



In response to

Responses

pgsql-performance by date

Next:From: Lincoln YeohDate: 2002-12-11 18:07:09
Subject: Docs: GIST
Previous:From: Andrew SullivanDate: 2002-12-11 15:48:28
Subject: Re: Which of the solution is better?

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