Subject | Re: [firebird-support] deadlock |
---|---|
Author | Tiberiu Horvath |
Post date | 2005-08-14T06:41:48Z |
It is more convenient to open all my TIBTables during program startup. And keep those that way.
But, of course, you are right. All my TIBTables shold stay closed, with
transaction.commit
after each change. When I had 5 tables, this thing worked well. With 50 tables ...
Thank you,
Tiberiu
object database: TIBDatabase
DatabaseName = 'C:\DEVELOP\GESTOCW\GESTOC.GDB'
Params.Strings = (
'user_name=SYSDBA'
'password=xxx')
LoginPrompt = False
DefaultTransaction = trans
IdleTimer = 0
SQLDialect = 3
TraceFlags = []
BeforeConnect = databaseBeforeConnect
Left = 32
Top = 8
end
object trans: TIBTransaction
Active = False
DefaultDatabase = database
Params.Strings = (
'read_committed'
'rec_version'
'nowait')
AutoStopAction = saNone
Left = 80
Top = 8
end
But, of course, you are right. All my TIBTables shold stay closed, with
transaction.commit
after each change. When I had 5 tables, this thing worked well. With 50 tables ...
Thank you,
Tiberiu
object database: TIBDatabase
DatabaseName = 'C:\DEVELOP\GESTOCW\GESTOC.GDB'
Params.Strings = (
'user_name=SYSDBA'
'password=xxx')
LoginPrompt = False
DefaultTransaction = trans
IdleTimer = 0
SQLDialect = 3
TraceFlags = []
BeforeConnect = databaseBeforeConnect
Left = 32
Top = 8
end
object trans: TIBTransaction
Active = False
DefaultDatabase = database
Params.Strings = (
'read_committed'
'rec_version'
'nowait')
AutoStopAction = saNone
Left = 80
Top = 8
end
----- Original Message -----
From: Helen Borrie
To: firebird-support@yahoogroups.com
Sent: Sunday, August 14, 2005 5:40 AM
Subject: Re: [firebird-support] deadlock
At 12:19 AM 13/08/2005 -0700, you wrote:
>I have my transaction for 50 TIBTables. If I Commit it, then I close all
>50 tables and have to open these again.
Do you have users who are capable of looking at 50 SELECT * queries
simultaneously? Do you realise that, if this transaction is read-write (as
it must be, if you are using TDataset methods to enable users to maintain
records!), you will create a tremendous amount of garbage in your database,
if you do not hard-commit that transaction frequently?
>
>Is it a good approach to have another transaction, only for new records,
>that I commit imediatly ?
As an approach to reducing your garbage overhead, you could (should!?!?!)
place your TIBTables into a read-only, Read Committed transaction and
perform *any* inserts, updates or deletes through quick DSQL requests that
do not hang around uncommitted for indefinite periods.
Watch out for your TIBTransactions. I believe they use AutoCommit with
CommitRetaining by default. CommitRetaining should be *avoided* under all
conditions except where you have implemented a way to force users to take
additional, frequent hard commit action.
Seriously consider abandoning those TIBTables and replacing them with
parameterised queries. And think hard for a good reason why you need 50
tables active at all times.
./heLen
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SPONSORED LINKS
Technical support Computer security Computer technical support Computer training Free computer technical support
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "firebird-support" on the web.
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Start your day with Yahoo! - make it your home page
[Non-text portions of this message have been removed]