Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Stored function 1000 times slower than in SQL*PLUS (??)
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 CST