Skip to content

Commit 1afed65

Browse files
committed
Proofread
1 parent 9db8c37 commit 1afed65

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

content/en/docs/refguide/modeling/domain-model/associations/association-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Association storage options give you more control over how associations are impl
1111

1212
## Association Tables vs. Direct Associations
1313

14-
You can choose whether to implement some associations as direct associations as opposed to using association tables. This means that the ID of the **Child** object is stored as a foreign key column of the **Parent** object (for example the "many" side of the association) in the underlying database table. This removes the need for an association table.
14+
You can choose whether to implement some associations as direct associations as opposed to using association tables. This means that the ID of the **Child** object is stored as a foreign key column of the **Parent** object (for example the "many" side of the association) in the underlying database table. This removes the need for an association table. In most cases, this is the recommended option.
1515

1616
Association tables have the advantage that you don't have to worry about the [multiplicity](/refguide/association-properties/#multiplicity) or [navigability](/refguide/association-properties/#navigability) of the associations. You can change things as your domain model evolves.
1717

@@ -58,6 +58,6 @@ For more information, see the [Association Storage](/refguide/association-proper
5858
Before deciding to switch from an association table to a direct association, bear the following in mind:
5959

6060
* Do not use direct associations in modules which are designed to be imported into apps (for example, Marketplace modules) as this could cause unexpected migrations in an app the module is being imported into.
61-
* Associations have to be rewritten to the database so migration can take a long time, especially where you have a large amount of data already stored in your database
61+
* Associations have to be rewritten to the database so migration can take a long time, especially where you have a large amount of data already stored in your database — Mendix has done some testing around this and you can find the results in [Association Storage Migration Time](/refguide/association-storage-migration-time/)
6262
* Queries are not always faster, and might not be faster in your use case
6363
* If you have written any custom SQL that accesses Mendix tables directly, this might break, but existing XPaths and OQL queries will not be affected

content/en/docs/refguide/runtime/data-storage/association-storage-migration-time.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Association storage migration time"
2+
title: "Association Storage Migration Time"
33
url: /refguide/association-storage-migration-time/
44
weight: 15
55
---
@@ -8,32 +8,34 @@ weight: 15
88

99
Mendix allows you to change [association storage type](/refguide/association-storage/) for many-to-one and one-to-one associations and switch between Association Tables (legacy option) or Direct Associations (recommended option). Changing the association storage type in an already deployed app leads to data synchronization which can take significant time depending on the amount of data in the database.
1010

11-
This page contains time measurements for association storage migration that can help you estimate data migration time for your app.
11+
This page contains timings for an example association storage migration that can help you estimate data migration time for your app.
1212

1313
## Scenarios
1414

15-
We performed association storage type migration for associations in the model shown below
15+
We performed association storage type migration for associations in the domain model shown below:
1616

1717
{{< figure src="/attachments/refguide/runtime/data-storage/association-storage-migration-time/association-storage-model.png" alt="Test model for association storage migration - click to enlarge" class="no-border" >}}
1818
(*Click the image to enlarge*)
1919

20-
The model was used to measure migration time for the following cases:
20+
This domain model was used to measure migration time for the following cases:
2121

2222
- **Many-to-one association:** Each of N objects of entity `Many` is associated to one of 10 objects of entity `ToOne`
2323
- **One-to-one association:** Each of N objects of entity `One` is associated to one of N objects of entity `ToOne`
24-
- **10 many-to-one associations in one entity:** Each of N objects of entity `Multiple` has 10 associations to objects of entities `Target01` to `Target10`. This means that there are 10*N association being migrated.
24+
- **10 many-to-one associations in one entity:** Each of N objects of entity `Multiple` has 10 associations to objects of entities `Target01` to `Target10`. This means that there are 10*N associations being migrated.
2525

26-
For every database vendor, we ran migration for 3 different values of N. For every such configuration, we executed the migration 10 times and measured the average migration time over those 10 runs.
26+
For every database vendor, we ran migrations for 3 different values of N. For each such configuration, we executed the migration 10 times and measured the average migration time over those 10 runs.
2727

2828
## Measurements
2929

30+
All the time measurements are in seconds (s).
31+
3032
### PostgreSQL
3133

3234
|Associations per table (N)|Many to one|One to one|Many to one, 10 associations in one entity|
3335
|-|-|-|-|
34-
|20K|0.176 seconds|0.194 seconds|1.08 seconds|
35-
|1M|8.3 seconds|9.2 seconds|38.1 seconds|
36-
|20M|199 seconds|222 seconds|850 seconds|
36+
|20K|0.176 s|0.194 s|1.08 s|
37+
|1M|8.3 s|9.2 s|38.1 s|
38+
|20M|199 s|222 s|850 s|
3739

3840
{{< figure src="/attachments/refguide/runtime/data-storage/association-storage-migration-time/storage-migration-postgres.png" alt="Migration time measurements for PostgreSQL - click to enlarge" class="no-border" >}}
3941
(*Click the image to enlarge*)
@@ -42,9 +44,9 @@ For every database vendor, we ran migration for 3 different values of N. For eve
4244

4345
|Associations per table (N)|Many to one|One to one|Many to one, 10 associations in one entity|
4446
|-|-|-|-|
45-
|20K|0.177 seconds|0.177 seconds|0.94 seconds|
46-
|1M|8.3 seconds|8 seconds|42 seconds|
47-
|20M|183 seconds|184 seconds|1013 seconds|
47+
|20K|0.177 s|0.177 s|0.94 s|
48+
|1M|8.3 s|8 s|42 s|
49+
|20M|183 s|184 s|1013 s|
4850

4951
{{< figure src="/attachments/refguide/runtime/data-storage/association-storage-migration-time/storage-migration-mssql.png" alt="Migration time measurements for SQL Server - click to enlarge" class="no-border" >}}
5052
(*Click the image to enlarge*)
@@ -53,9 +55,9 @@ For every database vendor, we ran migration for 3 different values of N. For eve
5355

5456
|Associations per table (N)|Many to one|One to one|Many to one, 10 associations in one entity|
5557
|-|-|-|-|
56-
|20K|0.568 seconds|0.567 seconds|6.492 seconds|
57-
|1M|19.9 seconds|22.8 seconds|295.1 seconds|
58-
|20M|473 seconds|605 seconds|7318 seconds|
58+
|20K|0.568 s|0.567 s|6.492 s|
59+
|1M|19.9 s|22.8 s|295.1 s|
60+
|20M|473 s|605 s|7318 s|
5961

6062
{{< figure src="/attachments/refguide/runtime/data-storage/association-storage-migration-time/storage-migration-mysql.png" alt="Migration time measurements for MySQL - click to enlarge" class="no-border" >}}
6163
(*Click the image to enlarge*)
@@ -64,10 +66,9 @@ For every database vendor, we ran migration for 3 different values of N. For eve
6466

6567
|Associations per table (N)|Many to one|One to one|Many to one, 10 associations in one entity|
6668
|-|-|-|-|
67-
|20K|0.132 seconds|0.148 seconds|1.17 seconds|
68-
|1M|3.2 seconds|3 seconds|18.9 seconds|
69-
|20M|23.1 seconds|27.9 seconds|184.7 seconds|
69+
|20K|0.132 s|0.148 s|1.17 s|
70+
|1M|3.2 s|3 s|18.9 s|
71+
|20M|23.1 s|27.9 s|184.7 s|
7072

7173
{{< figure src="/attachments/refguide/runtime/data-storage/association-storage-migration-time/storage-migration-saphana.png" alt="Migration time measurements for SAP HANA - click to enlarge" class="no-border" >}}
7274
(*Click the image to enlarge*)
73-

0 commit comments

Comments
 (0)