I took some typical loading scenarios in our company and try to load tables without keys and tables with keys. Then I compared times of both. So here are the results:
- Test 1: small star scheme
Number of tables: 4
Number of relationships: 3
Number of rows: around 100 000
Units in graph: seconds
Conclusion: Insert is 9% slower and select is the same. - Test 2: medium sized FACT and DIM table
Number of tables: 2
Number of relationships: 1
Number of rows: around 500 000
Units in graph: seconds
Comment: FACT table had lots of rows and inserting data is much more demanding than checking the constraints = keys does not slow down much
Conclusion: INSERT is a bit slower and SELECT is about 11% faster - Test 3: massive FACT and DIM table
Number of tables: 2
Number of relationships: 1
Number of rows: around 5 000 000
Units in graph: seconds for SELECT and minutes for INSERT
Comment: FACT table had lots of rows and inserting data is much more demanding than checking the constraints = keys does not slow down much
Conclusion: INSERT is a bit slower and SELECT is about 11% faster - Test 4: snowflake scheme
Number of tables: 8
Number of relationships: 7
Number of rows: around 600 000
Units in graph: seconds
Conclusion: INSERT is slowed down by 28%
No comments:
Post a Comment