Which of the solution is better?

Поиск
Список
Период
Сортировка
От Wei Weng
Тема Which of the solution is better?
Дата
Msg-id 5.1.1.6.0.20021210234537.00bae260@mail.futuris.net
обсуждение исходный текст
Ответ на Re: questions about disk configurations  (Ron Johnson <ron.l.johnson@cox.net>)
Ответы Re: Which of the solution is better?
Список pgsql-performance
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)

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.

Thanks a lot!

Wei


В списке pgsql-performance по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: questions about disk configurations
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: Which of the solution is better?