Re: Which of the solution is better? - Mailing list pgsql-performance

From Ron Johnson
Subject Re: Which of the solution is better?
Date
Msg-id 1039585564.1265.38.camel@haggis
Whole thread Raw
In response to Which of the solution is better?  (Wei Weng <wweng@kencast.com>)
Responses Re: Which of the solution is better?
List pgsql-performance
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.

--
+---------------------------------------------------------------+
| Ron Johnson, Jr.        mailto:ron.l.johnson@cox.net          |
| Jefferson, LA  USA      http://members.cox.net/ron.l.johnson  |
|                                                               |
| "My advice to you is to get married: If you find a good wife, |
| you will be happy; if not, you will become a philosopher."    |
|    Socrates                                                   |
+---------------------------------------------------------------+


pgsql-performance by date:

Previous
From: Wei Weng
Date:
Subject: Which of the solution is better?
Next
From: Wei Weng
Date:
Subject: Re: Which of the solution is better?