Re: two functions in query doubles time??

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: two functions in query doubles time??
Дата
Msg-id 6155.1110137678@sss.pgh.pa.us
обсуждение исходный текст
Ответ на two functions in query doubles time??  ("Sim Zacks" <sim@compulab.co.il>)
Список pgsql-general
"Sim Zacks" <sim@compulab.co.il> writes:
> I have a view that selects 2 functions, plus other data from a view and 2
> tables.
> A Select * on the join take approximately 1.3 seconds.
> Select function a() from the join takes about 1.3 seconds.
> select function b() from the join takes about 1.3 seconds.
> select a(),b() from the join takes about 2.5 seconds.

You sure about the first of those statements?  The explain results sure
look like it's the "functions" that are eating the bulk of the runtime.

> I am looking at the Explain Analyze for the previous 3 queries and it looks
> like a number of the joins are taking 50% longer in the last query.
> Does this make sense? Is there a reason for this?

The estimated row widths are different, implying that different sets of
columns are being pulled from the underlying tables.  Pushing more
columns around certainly affects the runtime.  (Depending on what
else is in the tables, I suppose this could explain why "select *"
seems so expensive.)

            regards, tom lane

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

Предыдущее
От: Tope Akinniyi
Дата:
Сообщение: Re: PRoblems instalation PostgreeSQL8.0.1 in WindowsXP
Следующее
От: "NTPT"
Дата:
Сообщение: Re: More concurent transaction over single connection