0% found this document useful (0 votes)
12 views1 page

Script

The document shows SQL statements to explain query plans and add a primary key to a table, then re-explains query plans after adding the primary key.

Uploaded by

Souhaib Drive
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views1 page

Script

The document shows SQL statements to explain query plans and add a primary key to a table, then re-explains query plans after adding the primary key.

Uploaded by

Souhaib Drive
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

explain plan for select nom from ville where insee = 1293;

Select plan_table_output from table(dbms_xplan.display());

explain plan for select nom from ville where insee = '1293';
Select plan_table_output from table(dbms_xplan.display());

alter table ville add primary key(insee);

explain plan for select d.nom from departement d, ville v where d.id = v.dep and
insee = 1293;
Select plan_table_output from table(dbms_xplan.display());

explain plan for select d.nom from departement d, ville v where d.id = v.dep and
insee = '1293';
Select plan_table_output from table(dbms_xplan.display());

You might also like