Explain Plan

Explain Plan

Post by Mário Alexandre Marti » Tue, 07 Dec 1999 04:00:00



I created the table above:

CREATE TABLE TESTE (COLUNA1 NUMERIC(2,0) PRIMARY KEY)

I insert one row in this table:

INSET INTO TESTE VALUES (1);

And now I want return this row with statement SELECT:

SELECT * FROM TESTE WHERE COLUNA1=10

Look this Explain plan:

SELECT * FROM TESTE WHERE COLUNA1=10

       |--Clustered Index
Scan(OBJECT:([MARTINI].[dbo].[TESTE].[PK__TESTE__5F9E293D]))

Why the explain plan use the function Convert?

And now I return this row with statement Select:

SELECT * FROM TESTE WHERE COLUNA1=10.

Look this Explain plain:

SELECT * FROM TESTE WHERE COLUNA1=10.
  |--Clustered Index
Seek(OBJECT:([MARTINI].[dbo].[TESTE].[PK__TESTE__5F9E293D]),

Why this occur???

Why the second Select is quicker than first????

Thank you for help!!

 
 
 

1. Explain Plan irregularity

While tuning a pl/sql procedure, I've noticed that my execution plan
will change after I hard code the dates in a between condition for a
insert into select statement. The between is meant to use passed in
variables to run for different periods. In fact, if I hard code the
dates the query will finish in 30 secs while passed in date variables
will run in about 15 minutes.

i.e.WHERE inv_date between '01-FEB-2002' and '01-MAR-2002';
if.WHERE inv_date between p_start_date and p_end_date;

Does anyone know why this is? Is there anything I can do about it?

Thanks

--
Posted via dBforums
http://dbforums.com

2. sql server exe memory keeps growing

3. Different Explain plan based on wildcard length

4. SQL query - datepart ?

5. Oracle and Explain Plan

6. MDAC 2.7, WIN98, NT40 and "Optional feature not implemented" error

7. EXPLAIN PLAN : better with RULE!

8. US-FL-FLORIDA GULF COAST- DEVELOPERS NEEDED

9. Cardinality from an Explain plan

10. Need help with explain plan and tkrpof ..

11. Problems during explain plan

12. Explain Plan Problem

13. Explain Plan for other users