If the trade-off is between normalization (SQL View) and performance / efficiency (SQL Table)

I have a rather lengthy business process, which ultimately leads to financial transactions.

In the end, what is important is that these final operations are exclusively exclusively, although I need to keep a journal of everything that led to this.

Since all the information contained in the final operations is available in other tables (used during the business process), it makes sense to use the presentation, but the presentation logic will be quite complicated (dozens of tables are involved), and I am concerned that:

  • even with the corresponding indexes, the table is likely to be faster (my table will eventually contain millions, if elements, and should be fully searchable in almost all of its columns)

  • presentation logic will be complex, so I am afraid that this may complicate the situation in a few years if I want to develop my business logic.

For these two reasons, I was a little tempted to write the data in the table at the end of my business process instead of relying on the view, but duplicating the data doesn't smell right (and it also looks a bit like premature optimization, but since it's such a central point in my design, I would like to solve the ASAP problem)

Have you ever come across such a choice? What have you decided?

: , .. , , - - .

+3
5

, , .

: " ". , , " ".

. , . - , .

, , , . :

, ( ) , , .

, . , . - .

. - , .

, - . !

+3

. : , . , - , , , . , , , .

+2

. , , , , , . , , .

, , - .

0

MrTelly, , ? , .

, , , 10 . . , , , 3/4 . 10 , ( ) ? , , clearer, , , . , . . , , .

0

. , , , . , , . .

:

0

Source: https://habr.com/ru/post/1705167/


All Articles