Re: Mysterious performance of query because of plsql function in

Поиск
Список
Период
Сортировка
От CoL
Тема Re: Mysterious performance of query because of plsql function in
Дата
Msg-id cc3r5g$210k$1@news.hub.org
обсуждение исходный текст
Ответ на Mysterious performance of query because of plsql function in where condition  ("Peter Alberer" <h9351252@obelix.wu-wien.ac.at>)
Список pgsql-performance
hi,

Peter Alberer wrote:

> Hi there,
>
> i have a problem with a query that uses the result of a plsql function
> In
> the where clause:
>
> SELECT
>    assignments.assignment_id,
>    assignments.package_id AS package_id,
>    assignments.title AS title,
>    COUNT(*) AS Count
> FROM
>    assignments INNER JOIN submissions ON
>    (assignments.assignment_id=submissions.assignment_id)
> WHERE
>    package_id=949589 AND
>    submission_status(submissions.submission_id)='closed'
> GROUP BY
>    assignments.assignment_id, assignments.package_id, assignments.title
> ORDER BY
>    assignments.title;
>
> Postgres seems to execute the function "submission_status" for every row
> of
> the submissions table (~1500 rows).

what is submission_status actualy?
\df submission_status
Is the function submission_status  called stable?

C.

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

Предыдущее
От: "Steinar H. Gunderson"
Дата:
Сообщение: Odd sorting behaviour
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: inserting into brand new database faster than old database