Home » RDBMS Server » Performance Tuning » explain plan (11g)
explain plan [message #456554] Tue, 18 May 2010 08:16 Go to next message
orafacjublu
Messages: 95
Registered: May 2006
Location: KOLKATA
Member
Can we have same execution plan for a create table statement where the name of the table changes every time as follows:

create table test
as
select * from t1

Here table name changes from test to another table name next time
Re: explain plan [message #456555 is a reply to message #456554] Tue, 18 May 2010 08:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Yes.

Regards
Michel
Re: explain plan [message #456556 is a reply to message #456555] Tue, 18 May 2010 08:18 Go to previous messageGo to next message
orafacjublu
Messages: 95
Registered: May 2006
Location: KOLKATA
Member
Could you pls give me an example
Thanks in advance
Re: explain plan [message #456559 is a reply to message #456556] Tue, 18 May 2010 08:27 Go to previous messageGo to next message
cookiemonster
Messages: 13958
Registered: September 2008
Location: Rainy Manchester
Senior Member
An example of what exactly?
You can run the explains and see for yourself.
Re: explain plan [message #456562 is a reply to message #456559] Tue, 18 May 2010 08:43 Go to previous messageGo to next message
orafacjublu
Messages: 95
Registered: May 2006
Location: KOLKATA
Member
say,

explain plan for
create table test1
as
select * from abc

after creating table test1 if I execute the following

explain plan for
create table test5
as
select * from test1

The explain plan doesn't use the earlier explain plan but I need it.Can we do?
Re: explain plan [message #456564 is a reply to message #456562] Tue, 18 May 2010 08:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
This is not the question you first posted.
You first posted:
Quote:
table name changes from test to another table name next time

You didn't say you also change the "select" part.

So now the answer is "no".

Regards
Michel
Re: explain plan [message #456567 is a reply to message #456564] Tue, 18 May 2010 08:59 Go to previous message
cookiemonster
Messages: 13958
Registered: September 2008
Location: Rainy Manchester
Senior Member
Explain plans and execution plans are specific to queries.
You are running two different queries (it might be getting the same data but it is getting it from a different place).
Why would you expect them to be the same?
What are you trying to achieve?
Previous Topic: need help with rewriting the query
Next Topic: Optimize sql
Goto Forum:
  


Current Time: Fri Nov 22 06:50:35 CST 2024