Stored function 1000 times slower than in SQL*PLUS (??)

From: Jaques Compere <compere_at_mail.nacamar.de>
Date: 1996/12/13
Message-ID: <32b13437.9203653_at_news.nacamar.de>#1/1


PROBLEM: An INSERT-Statement within a function of a stored PL/SQL-package takes much more time (2 hours) than the same INSERT-Statement executed in SQL*PLUS (5 seconds).

The INSERT is made up by an SELECT GROUP BY that contains a join of 3 tables (including the target-table for the insert).

If the tables contain between 10 000 and 30 000 records the PL/SQL-procedure runs for hours. If the tables only contain 1 record it takes only a few seconds.
Strangely the same insert executed in SQL*PLUS is finished in only a few seconds independent of the number of records in the tables.

Any infos or comments are appreciated!

ghampton_at_levi.com Received on Fri Dec 13 1996 - 00:00:00 CET

Original text of this message