A
Alain T.
Hi!
I built a Main table, normalized, containing about 800 records. It will
grow to about 1600-2000 records. 21 secondary tables (code, description)
are linked to the Main table. All the keys are indexed. On the Main table,
all secondary tables are link in the way showed in this sample :
SELECT TB_Groupes_Age.Code, TB_Groupes_Age.Description FROM TB_Groupes_Age
ORDER BY TB_Groupes_Age.Description;
When I display the content of the Main table, all the fields that contain
the foreign key display correctly the description instead of the code.
In the query, if I only chose the Main table, it is very fast. When I run
that query in Access, the fields that contains the foreign keys display
correctly the information from the secondary tables (for example, instead of
displaying the code 123, It would display "Emergency"). But if I get the
data in Excel, I get the code "123" instead of "Emergency", which is not
useful for people looking at the stats. To solve that problem, in the
query, I display the Main table and all the secondary tables so that all the
data are also transfered in Excel. It works very fast if I use 15 secondary
tables or less. More than that, big problem (after 90 minutes, it is still
not finished...)!
Below, you see a sample of the query with the main table and three secondary
ones (the construction is the same, but just bigger, with all the secondary
tables added) :
SELECT SCPU.Dte_Visite, SCPU.Période, TB_Accompagnements.Description,
TB_Centres_Référants.Description, TB_Dangerosités.Description
FROM TB_Dangerosités INNER JOIN (TB_Centres_Référants INNER JOIN
(TB_Accompagnements INNER JOIN SCPU ON TB_Accompagnements.Code =
SCPU.Accompagné) ON TB_Centres_Référants.Code = SCPU.Centre_Référant) ON
TB_Dangerosités.Code = SCPU.Dangerosité;
Is there a way to speed up the query?
Thanks a lot for any information provided.
Alain T.
I built a Main table, normalized, containing about 800 records. It will
grow to about 1600-2000 records. 21 secondary tables (code, description)
are linked to the Main table. All the keys are indexed. On the Main table,
all secondary tables are link in the way showed in this sample :
SELECT TB_Groupes_Age.Code, TB_Groupes_Age.Description FROM TB_Groupes_Age
ORDER BY TB_Groupes_Age.Description;
When I display the content of the Main table, all the fields that contain
the foreign key display correctly the description instead of the code.
In the query, if I only chose the Main table, it is very fast. When I run
that query in Access, the fields that contains the foreign keys display
correctly the information from the secondary tables (for example, instead of
displaying the code 123, It would display "Emergency"). But if I get the
data in Excel, I get the code "123" instead of "Emergency", which is not
useful for people looking at the stats. To solve that problem, in the
query, I display the Main table and all the secondary tables so that all the
data are also transfered in Excel. It works very fast if I use 15 secondary
tables or less. More than that, big problem (after 90 minutes, it is still
not finished...)!
Below, you see a sample of the query with the main table and three secondary
ones (the construction is the same, but just bigger, with all the secondary
tables added) :
SELECT SCPU.Dte_Visite, SCPU.Période, TB_Accompagnements.Description,
TB_Centres_Référants.Description, TB_Dangerosités.Description
FROM TB_Dangerosités INNER JOIN (TB_Centres_Référants INNER JOIN
(TB_Accompagnements INNER JOIN SCPU ON TB_Accompagnements.Code =
SCPU.Accompagné) ON TB_Centres_Référants.Code = SCPU.Centre_Référant) ON
TB_Dangerosités.Code = SCPU.Dangerosité;
Is there a way to speed up the query?
Thanks a lot for any information provided.
Alain T.