Subject | Execute statement |
---|---|
Author | Mahesh Ishwar |
Post date | 2003-11-12T03:52:11Z |
Hello all,
I've a simple select query
select column1 from table1 where column1 = '<some value>'.
column1 is indexed, so whenever I see the plan of the query, it shows me the index being used for the fetch. So far as good. But when I execute this query within execute statement, i.e. ,
execute statement('select column1 from table1 where column1 = <some value>'), though it gives me correct answer, in the plan it doesn't shows me the index being used. Does this mean that execute statement doesn't includes index while querying or it does, but the plan (shown with isql ) is not updating the plan for execute statement. If the index is not being used, the query would be painfully slow if the number of records is high.
I'm using Firebird 1.5.3774, and both the statements executed are in a stored procedure.
Please help me clear me doubt.
Thanx in advance.
Mahesh.
---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
[Non-text portions of this message have been removed]
I've a simple select query
select column1 from table1 where column1 = '<some value>'.
column1 is indexed, so whenever I see the plan of the query, it shows me the index being used for the fetch. So far as good. But when I execute this query within execute statement, i.e. ,
execute statement('select column1 from table1 where column1 = <some value>'), though it gives me correct answer, in the plan it doesn't shows me the index being used. Does this mean that execute statement doesn't includes index while querying or it does, but the plan (shown with isql ) is not updating the plan for execute statement. If the index is not being used, the query would be painfully slow if the number of records is high.
I'm using Firebird 1.5.3774, and both the statements executed are in a stored procedure.
Please help me clear me doubt.
Thanx in advance.
Mahesh.
---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
[Non-text portions of this message have been removed]