Subject | RE: [firebird-support] Maintaining proper generator values |
---|---|
Author | Wilson, Fred |
Post date | 2003-11-11T16:53:50Z |
Again, this isn't multi-user safe.
It's assuming that there is one and only one client application, ever.
If one is getting duplicate generated values, I would suggest that there's a
problem, and further would suggest finding and fixing the problem
We use generators on virtually all of our tables, to furnish the PK's.
We have extremely busy databases. There can be well over 30 clients, many of
which are inserting new records, into various tables at the rate of 3 ~ 4
per second, per client.
We never have problems with duplicated PK's, unless someone's "gone in by
hand and dinked something"
Best regards,
Fred Wilson
SE, Böwe Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>
-----Original Message-----
From: Doug Chamberlin [mailto:yahoogroups@...]
Sent: Tuesday, November 11, 2003 9:40 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Maintaining proper generator values
Maintaining generator values which do not conflict with existing field
values is better done in the client. What I do while my client application
is starting up is to query the max existing value and if the generator is
currently set below that then I reset it to max+1. This is done for every
table which uses a generated field value. I have a short table in the
database which lists tablename, fieldname, generatorname so the application
just loops through these and checks each one. Simple, easy, efficient, and
well worth it to avoid duplicate generated values.
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/SIG=12cbl32s9/M=258297.4155332.5363524.4049140/D=egroup
web/S=1705115386:HM/EXP=1068655224/A=1683962/R=0/*http://www.techsmith.com/r
dr/ban/syah/default.asp> click here
<http://us.adserver.yahoo.com/l?M=258297.4155332.5363524.4049140/D=egroupmai
l/S=:HM/A=1683962/rand=679885381>
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
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
It's assuming that there is one and only one client application, ever.
If one is getting duplicate generated values, I would suggest that there's a
problem, and further would suggest finding and fixing the problem
We use generators on virtually all of our tables, to furnish the PK's.
We have extremely busy databases. There can be well over 30 clients, many of
which are inserting new records, into various tables at the rate of 3 ~ 4
per second, per client.
We never have problems with duplicated PK's, unless someone's "gone in by
hand and dinked something"
Best regards,
Fred Wilson
SE, Böwe Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>
-----Original Message-----
From: Doug Chamberlin [mailto:yahoogroups@...]
Sent: Tuesday, November 11, 2003 9:40 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Maintaining proper generator values
Maintaining generator values which do not conflict with existing field
values is better done in the client. What I do while my client application
is starting up is to query the max existing value and if the generator is
currently set below that then I reset it to max+1. This is done for every
table which uses a generated field value. I have a short table in the
database which lists tablename, fieldname, generatorname so the application
just loops through these and checks each one. Simple, easy, efficient, and
well worth it to avoid duplicate generated values.
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/SIG=12cbl32s9/M=258297.4155332.5363524.4049140/D=egroup
web/S=1705115386:HM/EXP=1068655224/A=1683962/R=0/*http://www.techsmith.com/r
dr/ban/syah/default.asp> click here
<http://us.adserver.yahoo.com/l?M=258297.4155332.5363524.4049140/D=egroupmai
l/S=:HM/A=1683962/rand=679885381>
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
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]