B
Bruce
I have a database with a header table and related details table with the following structure.
1) The Header table has a Primay Key Code of type text.
2) The detail table has a concatenated Primary Key of Code and Date which are type text and text.
3) The relationship has been established one to many with referential integrity enabled
However the detail table has 6 million records and queries can be slow. I have been reading that I should add a pseudo key that is indexed.
So I have added the following;
1) A field ID to the header table of type autonumber
2) A field ID in the detail table of type long int
What im not sure of is;
1) Do I need to change my primary key? Should is include the field ID
2) What relationships should be set for the use of the pseudo key.
Regards,
Bruce
1) The Header table has a Primay Key Code of type text.
2) The detail table has a concatenated Primary Key of Code and Date which are type text and text.
3) The relationship has been established one to many with referential integrity enabled
However the detail table has 6 million records and queries can be slow. I have been reading that I should add a pseudo key that is indexed.
So I have added the following;
1) A field ID to the header table of type autonumber
2) A field ID in the detail table of type long int
What im not sure of is;
1) Do I need to change my primary key? Should is include the field ID
2) What relationships should be set for the use of the pseudo key.
Regards,
Bruce