Subject | Re: foreign keys ans slow insert |
---|---|
Author | Svein Erling Tysvær |
Post date | 2004-09-30T08:21Z |
--- In firebird-support@yahoogroups.com, German Pablo Gentile wrote:
this? It is OK to have a foreign key to customer in the order table,
but it is not OK to have a foreign key to status when 90% of the
records have the status 'Completed'. And what does the three seconds
include? Connect to database, insert record, commit transaction or
simply insert record without connection or transaction timing. Do you
have any triggers firing at the time of insert (I thought duplicates
wouldn't cause much trouble when inserting, but that updating and
deleting could suffer from duplicates)?
Set
> I will rewrite my question, as i see the orginial post was notGerman, you say "not unique" for the FKs. Exactly how "not unique" is
> clear. Sorry for my english.
>
> I have a table with a moderated grow rate (100000 records at month).
> Actually have only 100000 records. That table have ten ids to ten
> tables, all have foreign keys. the ids inserted in the main table
> related to the other tables are not unique.
>
> The performence is terrible,it takes 3 seconds to insert a record.
> I need to know what can i be wrong. I try all: async writes,
> sweep = 0 , backup restoring, running server in w2k, linux,nothing
> works. Im using FB 1.5.1 and FIB+.
>
> Any help welcomed.
this? It is OK to have a foreign key to customer in the order table,
but it is not OK to have a foreign key to status when 90% of the
records have the status 'Completed'. And what does the three seconds
include? Connect to database, insert record, commit transaction or
simply insert record without connection or transaction timing. Do you
have any triggers firing at the time of insert (I thought duplicates
wouldn't cause much trouble when inserting, but that updating and
deleting could suffer from duplicates)?
Set