Re: performance and number of selected columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: performance and number of selected columns
Дата
Msg-id 18117.959011086@sss.pgh.pa.us
обсуждение исходный текст
Ответ на performance and number of selected columns  (Dirk Lutzebaeck <lutzeb@aeccom.com>)
Список pgsql-general
Dirk Lutzebaeck <lutzeb@aeccom.com> writes:
> say I have three tables a,b,c with lots of columns (say 10 for each
> table). Using psql command line, why does
>  SELECT a.*,b.*,c.* FROM a,b,c
> takes much more longer (in my specifc case 3 times) than only
> selecting one column like
>  SELECT a.oid, b.oid, c.oid FROM a,b,c.

I'd guess you are simply looking at the increased time to transfer
the additional data to the frontend, format it for display, etc.
With a pure cartesian-product join like that (no WHERE), the backend
is basically going to be spitting out tuples as fast as it can read
them from disk...

            regards, tom lane

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

Предыдущее
От: Ron Peterson
Дата:
Сообщение: Re: Re: [HACKERS] Postgresql OO Patch
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: Re: RPM troubleshoot