CQRS is well described in this article - here.
Here is the link to particular part of the article above, where author talk about read model.
Have you ever faced a problem that your query against your data is too slow?
It can happens when you use INNER JOIN or GROUP BY(or maybe you use C# LINQ) statements a lot and plus when you have big amount of data, then your request indeed will be very slow.
I have faced the same problem and I came to idea that CQRS can help me.
How actually it can help? So, I seperated my model to write and read stacks. Where read stack in my case is the storage of result of "heavy" queries. In order to check that request against query result is really faster than executing and waiting for query to finish I have created this repo.
Just download the repo and press F5, SQLite database is already created and full of data. It contains 200 items of Category entity and about 1,100,000 items of Product
Take into account that first several requests will take longer since it takes ASP .NET Core Web API to do some inner routines as a result it takes time, so start to write down the result after several HTTP requests
On this screenshot you can see the request against endpoint that returns you the results of the query
On this screenshot you can see the request against endpoint that executes query that uses GROUP BY statement in it
On this screenshot you can see the request against endpoint that executes query that don't use GROUP BY statement in it but still calculates query on demand
I actually can see that reading query result is faster than calculating query. Actually it is faster in about 10 times. The only thing left is to keep updating information that is stored in the table where query result is but user won't feel it since in the background you will update this data granullary even if you will re-calculate data in general using "heavy" query user won't feel since in mean time he/she will do other staff but not waiting for your query to complete


