Subject | Re: [IBO] performance improvements |
---|---|
Author | Helen Borrie |
Post date | 2003-10-20T07:01:39Z |
At 01:10 AM 20/10/2003 +0200, you wrote:
automatically. Don't create another index on the PK column(s).
and other issues relating to your database design.
that it is prepared only once in a session. Don't set the SQL property in
code unless you have a reason to need it. Set the SQL property in the
event that creates the object and use parameters. You don't have to
unprepare the procedure call to change its parameter values; and always
test before calling Prepare.
The ParamByName() method *always* prepares a statement if it is not already
prepared.
form, then its creation is part of the form's formcreate event. I hope the
notes above answer your question.
Helen
>while reading tips to improve performance found statement, that dublicateTrue. Don't do it.
>primary & foreign keys indexes downgrade performace.
>If I have two tables A & B (master-detail relatioship), so I need to setNo. If you have set primary key constraints, the database creates indexes
>indexes only for A & B primary keys?
automatically. Don't create another index on the PK column(s).
>do I need a foreign key for foreignIt can. Ask on the firebird-support list about indexes of low selectivity
>key in A table or this would downgrade performance?
and other issues relating to your database design.
>if using stored procedures & select from it (select * fromYes. Since the metadata of a stored procedure doesn't change, make sure
>StoredProcedure(params)), prepare would take everytime if I set SQL
>dynamically
that it is prepared only once in a session. Don't set the SQL property in
code unless you have a reason to need it. Set the SQL property in the
event that creates the object and use parameters. You don't have to
unprepare the procedure call to change its parameter values; and always
test before calling Prepare.
The ParamByName() method *always* prepares a statement if it is not already
prepared.
>(this select would occure everytime before opening one formCan't quite work this one out. If your dataset object is created by a
>while other select would be set to open another forms)
form, then its creation is part of the form's formcreate event. I hope the
notes above answer your question.
Helen