Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using the EXPLAIN PLAN command

Oracle expert Brian Peasland explains how using the EXPLAIN PLAN command will help to execute an insert statement.

I have a query like this:

Insert into table1 as select * from view1;

This was taking a few seconds to be executed on Oracle 9i database, but now since we migrated to a 10g database, the above insert statement is taking minutes (8-10). How can I resolve this?

First, make sure that your optimizer statistics on VIEW1's underlying tables and indexes are up to date. Next, you'll need to ensure that the query "select * from view1" is running with the same execution plan. This requires you to use the EXPLAIN PLAN command. The following shows you how to use Explain Plan:

http://www.adp-gmbh.ch/ora/explainplan.html

Dig Deeper on Oracle database administration

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close