OCPP.Core icon indicating copy to clipboard operation
OCPP.Core copied to clipboard

Eliminate database view for big performance improvement

Open JeremyMahieu opened this issue 2 months ago • 0 comments

Instead of using the view in the database, use a query directly. I kept he view object as a viewmodel, can change it later. Also this doesn't delete the view from the database, to delete that we can do a migration later.

This speeds the loading of the homepage up from 1700s to 100ms in my case. Depends on how large the Transactions table is.

We can also later shorten this query using automapper and ProjectTo instead of the long select.

JeremyMahieu avatar Apr 06 '24 10:04 JeremyMahieu