delete performance from a package and standalone
From: z1hou1 <z1hou1_at_gmail.com>
Date: Fri, 13 Nov 2009 12:35:14 -0800 (PST)
Message-ID: <73d3d0ce-5d63-4b2e-9cca-00c67c5c9eba_at_p8g2000yqb.googlegroups.com>
Hi,
I am facing a peculiar issue. I have a package with a procedure that handles deletes off a particular table. The delete runs in sub seconds for about 10000 rows when I execute it standalone from sqlplus. But the very same statement from inside a stored procedure (of the package) indicates a full table scan and takes forever to run.
Date: Fri, 13 Nov 2009 12:35:14 -0800 (PST)
Message-ID: <73d3d0ce-5d63-4b2e-9cca-00c67c5c9eba_at_p8g2000yqb.googlegroups.com>
Hi,
I am facing a peculiar issue. I have a package with a procedure that handles deletes off a particular table. The delete runs in sub seconds for about 10000 rows when I execute it standalone from sqlplus. But the very same statement from inside a stored procedure (of the package) indicates a full table scan and takes forever to run.
What is it that I may be doing that causes the very same delete to run with different plans from a stored procedure as opposed to an anonymous sql block?
Thanking you all for your response.
Regards,
z1hou1
Received on Fri Nov 13 2009 - 14:35:14 CST