Hi folks
what a great response. Thanks a lot.
Some remarks from me:
(Juri)
>AFAIU the problem, the first procedure (without exec stmt) runs very
>slowly and the second (same statement, but only executed thru exec
>stmt) runs fast. Or did I miss something?
Thats correct. I am just wondering about this speed difference. I expected the quicker execution by running this without exec stmt.
> (Helen) 1. The index isn't available if you use LIKE.
No. If I execute the query out of the procedure and have a look of the
performance analysis (shown from IB-Manager from EMS) the query was executed by using
indexreads :-). This looks like using the index to me - or not?
> 1a.(paul) By the way, you should have an index on SuchName field!
SuchName have an index and all values are UpperCase and a concation of 3 relevant parts of the record.
> 2.(Helen) tmpSQL variable isn't used here
Sorry, this was resulting in copy and paste by creating a simple "testcase". This variable is used in only one example.
> 3.(Helen) A cursor is much faster than a subquery
Good idea. This looks nice. I will test it tommorow morning.
for select IDPerson from personen where SuchName STARTING WITH :SuchName1 into :v_idperson do insert into HilfeListe(ID,Bereich) values (:v_idperson, :bereich);
> (Helen) 4. This is a firebird-support question.
You are right. Please give me a link to an activ group (like this :-))
> 5.(Mahdu) where SuchName STARTING WITH :SuchName1;
> 5a.(Slavek) Summary, use other statement instead LIKE. > LIKE must be used very carefully on big tables .
Because user enter only a part (start) of the searchname i had no alternative way to find the records before. I don't know this statement. Thanks, i will test it.
By the way. Is there any full documentation of the statements availible?.
I often use an old documentation for Interbase. I get it from Borland 10 years ago :-) and found i on internet too.
> 6.(
Slavek) Also if autor will send execution plan this will be
> more helpfull then only general question.
Well. How can i get the plan from running a procedure?
My tool will show the count of reads, Indexreads from running a query
but only out of the procedure. This results give me a hint for running
it in 10ms. This was the reason for trying the way of calling execute
statement. How can i get the plan from running it into a procedure?
Once more again - thanks a lot for the given ideas. BUT? The running of the (same) statement was "on the fly" quicker. I am wondering about this :-)
Good night.
Niels
|
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs..
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider