How to avoid performance problems with tables that contain lots of data?

1

I'm developing a payroll system, in which there is a 'problem' in one of your tables.
For, to control the discounts in the pay of each employee, I thought of creating a table with the name: Discounts that would have the fields, such as: id, day / hour , type , value_descontado , remarks'. However, this table will eventually have many records because the company has 150 employees.

Obs : How could I better shape this part of the system to avoid long-term problems?

    
asked by anonymous 28.11.2017 / 15:54

1 answer

1

1st Is table data modeling done well? Because depending on the construction of the table you can substitute the type as "TIPOABCDE" to 1, minimizing the amount of bytes per record and consequently decreasing the search time in the table.

Also see how normalized your tables are. Leave in the main table only indexes referencing relationships with other tables, avoiding leaving too much load on a single table making it too heavy.

2º Would such a 'problem' be performance? Would the problem occur during a query in a table or a report?

In this case, the problem may not be in a large amount of data in the table, so an indexed month / year helper column could speed up the search depending on the query, or simply trying to correct it if there are bad joins. ends the bank's performance)

Another way to reduce processing time is to use subquery factoring techniques, which if well used can shorten the time of a query

3rd. Is the machine where this processing system is made dedicated? If not, you may experience performance issues not on account of your system, but on account of competition from this system with others on the machine.

    
28.11.2017 / 20:00