pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: CoL <col@mportal.hu>
To: pgsql-performance@postgresql.org
Subject: Re: Mysterious performance of query because of plsql function in
Date: Fri, 02 Jul 2004 16:23:44 +0200
Message-ID: <cc3r5g$210k$1@news.hub.org> (raw)
In-Reply-To: <000001c46009$062e8260$5be0d089@ekelhardt>
References: <000001c46009$062e8260$5be0d089@ekelhardt>

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.



view thread (4+ messages)

Message-ID: <cc3r5g$210k$1@news.hub.org>
Permalink:  ../cc3r5g$210k$1@news.hub.org/
Also on:    postgresql.org/message-id/cc3r5g$210k$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: col@mportal.hu
  Subject: Re: Mysterious performance of query because of plsql function in
  In-Reply-To: <cc3r5g$210k$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox